[udig-devel] Class IGeoResourceInfo
Jesse Eichar
jeichar.w at gmail.com
Thu May 29 05:31:41 PDT 2008
I think we use to WKT to display the crs information.
Jesse
On 29-May-08, at 12:10 PM, iomeneandrei wrote:
>
> Hi all,
> we are using IGeoResourceInfo class to get the CRS of a layer.
> We are using this kind of code:
> public String getCRS(ILayer l){
> String s_crs="";
> IGeoResource resource = l.getGeoResource();
> try {
> IGeoResourceInfo info = resource.getInfo( new
> NullProgressMonitor() );
> System.out.println("Info.getCRS:"+info.toString());
> CoordinateReferenceSystem crs=info.getCRS();
> s_crs = crs.toString();
> } catch (IOException e) {
> // TODO Auto-generated catch block
> e.printStackTrace();
> }
> return s_crs;
> }
>
> If I print the CRS inside eclipse I have:
>
> PROJCS["ED50 / UTM zone 33N",
> GEOGCS["ED50",
> DATUM["D_European_1950",
> SPHEROID["International_1924", 6378388.0, 297.0]],
> PRIMEM["Greenwich", 0.0],
> UNIT["degree", 0.017453292519943295],
> AXIS["Lon", EAST],
> AXIS["Lat", NORTH]],
> PROJECTION["Transverse_Mercator"],
> PARAMETER["central_meridian", 15.0],
> PARAMETER["latitude_of_origin", 0.0],
> PARAMETER["scale_factor", 0.9996],
> PARAMETER["false_easting", 500000.0],
> PARAMETER["false_northing", 0.0],
> UNIT["m", 1.0],
> AXIS["x", EAST],
> AXIS["y", NORTH]]
>
> If I make in udig right click on this layer, and select Properties I
> have:
>
> PROJCS["ED50 / UTM zone 33N",
> GEOGCS["ED50",
> DATUM["European_Datum_1950",
> SPHEROID["International 1924", 6378388.0, 297.0,
> AUTHORITY["EPSG","7022"]],
> AUTHORITY["EPSG","6230"]],
> PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]],
> UNIT["degree", 0.017453292519943295],
> AXIS["Lon", EAST],
> AXIS["Lat", NORTH],
> AUTHORITY["EPSG","4230"]],
> PROJECTION["Transverse_Mercator"],
> PARAMETER["central_meridian", 15.0],
> PARAMETER["latitude_of_origin", 0.0],
> PARAMETER["scale_factor", 0.9996],
> PARAMETER["false_easting", 500000.0],
> PARAMETER["false_northing", 0.0],
> UNIT["m", 1.0],
> AXIS["x", EAST],
> AXIS["y", NORTH],
> AUTHORITY["EPSG","23033"]]
>
> It seems the some, but there is a difference is in the last record,
> in which
> I can read the EPSG code.
> Is it normal that these infos are different? If yes how can I read
> inside
> eclipse the some info I can read in UDig?
>
> I'm attaching the shapefile I have used to make this test.
>
> Thank you,
>
> Andrea
>
> http://www.nabble.com/file/p17532399/test.zip test.zip
>
> -----
> Andrea Borruso
>
> ----------------------------------------------------
> email: aborruso at tin.it
> blog: http://blog.spaziogis.it
> ----------------------------------------------------
> --
> View this message in context: http://www.nabble.com/Class-IGeoResourceInfo-tp17532399p17532399.html
> Sent from the udig-devel mailing list archive at Nabble.com.
>
> _______________________________________________
> User-friendly Desktop Internet GIS (uDig)
> http://udig.refractions.net
> http://lists.refractions.net/mailman/listinfo/udig-devel
More information about the udig-devel
mailing list