This time I didn't use applet. I deployed the app onto the server and it 
was called as a bean. I had geoapi-nogenerics-2.1-M2.jar, 
gt2-referencing-2.3.2.jar, gt2-epsg-hsql-2.3.2.jar, hsqldb-1.8.0.1.jar and
jsr108-0.01.jar in my class path. Before I deployed it worked well 
locally but when I ran the web it reported that the epsg code couldn't 
be found. Do I need do something on the server side?

Thanks,

Sun

Jody Garnett wrote:
> 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
>> Geotools-devel@lists.sourceforge.net
>> 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
> Geotools-devel@lists.sourceforge.net
> 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
Geotools-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to