Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [udig-devel] Class IGeoResourceInfo

Its been a while since I've looked at the code... I think that the CRS on the IGeoResource is read directly from the datafile but in the layer a seach of somesort is done to try to find the matching EPSG code and then use that definition instead. That is the only think I can think of.

Jesse

On 29-May-08, at 4:43 PM, iomeneandrei wrote:


Hi Jesse,


Jesse Eichar-2 wrote:

 I think we use to WKT to display the crs information.


I have modified my code, and I have inserted "toWKT":
public String getCRS(ILayer l){
       String s_crs="";
       IGeoResource resource = l.getGeoResource();
       try {
           IGeoResourceInfo info = resource.getInfo( new
NullProgressMonitor() );
           CoordinateReferenceSystem crs=info.getCRS();
           s_crs = crs.toString();

System.out.println("WKT:\n"+crs.toWKT()+"****************\n");//qui
           System.out.println("wkt2:");
           System.out.println(info.getCRS().toWKT());
       } catch (IOException e) {
           e.printStackTrace();
       }
       return s_crs;
   }

I have always a difference between what I'm able to read in UDig and what
Eclipse read for the some layer.

Do you know why?

Thank you,

Andrea

-----
Andrea Borruso

----------------------------------------------------
email: aborruso@xxxxxx
blog: http://blog.spaziogis.it
----------------------------------------------------
--
View this message in context: http://www.nabble.com/Class-IGeoResourceInfo-tp17532399p17536257.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



Back to the top