From: Jody G. <jga...@re...> - 2007-07-27 00:08:00
|
These pages were getting too long; split up to answer your questions more directly: - http://docs.codehaus.org/display/GEOTDOC/01+CRS+Helper+Class - http://docs.codehaus.org/display/GEOTDOC/09+Referencing+Authority+Factories - http://docs.codehaus.org/display/GEOTDOC/10+Referencing+Factories Just letting you know that links have changed, Jody > Nope that is not how you are supposed to use it. > > CRSAuthorityFactory is not actually a factory - it is a "builder" that > makes use of internal definitions to produce the object defined by the > code you defined. The code is usually of the form "EPSG:4326" or some > other number - "NAD27/UTM zone 11N" is a name. > > If at all possible use the CRS utility class: > - http://docs.codehaus.org/display/GEOTDOC/01+CRS+Helper+Class > > Just make sure you have one of the *epsg* plugins on the classpath and > you are good to go. > - http://docs.codehaus.org/display/GEOTDOC/03+Referencing > > If you really want to use this stuff directly: > - http://docs.codehaus.org/display/GEOTDOC/09+Referencing+Factories > > You can use a name to look up the matching object but it is a very slow > process. You need to create an IdentifiedObject with the correct name > and then search for the CoordianteReferenceSystem that matches it. This > functionality is only available through the AbstractAuthorityFactory > class - it is not part of the formal GeoAPI interfaces. I would view > this functionality as experimental. > > Since I don't have an example of "searching by name" in the docs yet let > me write one up for you (but please review!) > > Cheers, > Jody > > > >> Does anyone know how to use EPSGCRSAuthorityFactory? >> In my code, I created a crs in this way: >> CoordinateReferenceSystem crs; >> EPSGCRSAuthorityFactory crsFactory = new EPSGCRSAuthorityFactory(); >> crs = (CoordinateReferenceSystem) crsFactory.createObject("NAD27/UTM >> zone 11N"); >> The returned crs is null; >> I change the parameter: >> crs = (CoordinateReferenceSystem) crsFactory.createObject("EPSG:26910"); >> to have a test it is still null. >> Then what is the correct way to use EPSGCRSAuthorityFactory? >> >> Sun >> >> ------------------------------------------------------------------------ >> Choose the right car based on your needs. Check out Yahoo! Autos new >> Car Finder tool. >> <http://us.rd.yahoo.com/evt=48518/*http://autos.yahoo.com/carfinder/;_ylc=X3oDMTE3NWsyMDd2BF9TAzk3MTA3MDc2BHNlYwNtYWlsdGFncwRzbGsDY2FyLWZpbmRlcg--%20> >> >> ------------------------------------------------------------------------ >> >> ------------------------------------------------------------------------- >> This SF.net email is sponsored by: Splunk Inc. >> Still grepping through log files to find problems? Stop. >> Now Search log events and configuration files using AJAX and a browser. >> Download your FREE copy of Splunk now >> http://get.splunk.com/ >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Geotools-devel mailing list >> Geo...@li... >> https://lists.sourceforge.net/lists/listinfo/geotools-devel >> >> > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Geotools-devel mailing list > Geo...@li... > https://lists.sourceforge.net/lists/listinfo/geotools-devel > |