Revision 61
org.gvsig.raster.osm/trunk/org.gvsig.raster.osm/org.gvsig.raster.osm.io/src/main/java/org/gvsig/raster/osm/io/OSMProvider.java | ||
---|---|---|
53 | 53 |
import org.gvsig.raster.osm.downloader.OSMTileServer; |
54 | 54 |
import org.gvsig.tools.ToolsLocator; |
55 | 55 |
import org.gvsig.tools.task.TaskStatus; |
56 |
import org.slf4j.Logger; |
|
57 |
import org.slf4j.LoggerFactory; |
|
56 | 58 |
/** |
57 | 59 |
* Data provider for OSM servers |
58 | 60 |
* |
... | ... | |
66 | 68 |
private TileServer tileServer = null; |
67 | 69 |
private boolean open = false; |
68 | 70 |
private DataStoreTransparency fileTransparency = null; |
69 |
//private static final Logger logger = LoggerFactory.getLogger(OSMProvider.class);
|
|
71 |
private static final Logger logger = LoggerFactory.getLogger(OSMProvider.class); |
|
70 | 72 |
|
71 | 73 |
public static void register() { |
72 | 74 |
DataManagerProviderServices dataman = (DataManagerProviderServices) DALLocator.getDataManager(); |
... | ... | |
119 | 121 |
} |
120 | 122 |
|
121 | 123 |
public IProjection getProjection() { |
122 |
if(proj == null) |
|
123 |
proj = CRSFactory.getCRS("EPSG:900913"); |
|
124 |
if(proj == null) { |
|
125 |
try { |
|
126 |
proj = CRSFactory.getCRS("EPSG:3785"); |
|
127 |
} catch(Exception e) { |
|
128 |
logger.info("Projection not loaded", e); |
|
129 |
} |
|
130 |
} |
|
124 | 131 |
return proj; |
125 | 132 |
} |
126 | 133 |
|
org.gvsig.raster.osm/trunk/org.gvsig.raster.osm/org.gvsig.raster.osm.app.osmclient/src/main/java/org/gvsig/raster/osm/app/osmclient/OSMClientExtension.java | ||
---|---|---|
27 | 27 |
|
28 | 28 |
import javax.swing.JOptionPane; |
29 | 29 |
|
30 |
import org.cresques.cts.IProjection; |
|
30 | 31 |
import org.gvsig.about.AboutManager; |
31 | 32 |
import org.gvsig.about.AboutParticipant; |
32 | 33 |
import org.gvsig.andami.IconThemeHelper; |
... | ... | |
34 | 35 |
import org.gvsig.app.ApplicationLocator; |
35 | 36 |
import org.gvsig.app.ApplicationManager; |
36 | 37 |
import org.gvsig.app.extension.AddLayer; |
38 |
import org.gvsig.fmap.crs.CRSFactory; |
|
37 | 39 |
import org.gvsig.i18n.Messages; |
38 | 40 |
import org.slf4j.Logger; |
39 | 41 |
import org.slf4j.LoggerFactory; |
... | ... | |
72 | 74 |
} |
73 | 75 |
|
74 | 76 |
private void loadEpsg3785InJCRSUserDatabase() { |
77 |
IProjection proj = null; |
|
78 |
try { |
|
79 |
proj = CRSFactory.getCRS("EPSG:3785"); |
|
80 |
} catch(Exception e) { |
|
81 |
} |
|
82 |
|
|
83 |
if(proj != null) |
|
84 |
return; |
|
85 |
|
|
75 | 86 |
String wkt = "'PROJCS[\"WGS 84 / Pseudo-Mercator\",GEOGCS[\"Popular Visualisation CRS\",DATUM[\"D_Popular_Visualisation_Datum\",SPHEROID[\"Popular_Visualisation_Sphere\",6378137,0]],PRIMEM[\"Greenwich\",0],UNIT[\"Degree\",0.017453292519943295]],PROJECTION[\"Mercator\"],PARAMETER[\"central_meridian\",0],PARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",0],PARAMETER[\"false_northing\",0],UNIT[\"Meter\",1]]'"; |
76 | 87 |
try { |
77 | 88 |
es.idr.teledeteccion.connection.EpsgConnection conn = new es.idr.teledeteccion.connection.EpsgConnection(); |
Also available in: Unified diff