Hey Shyam,
I've had the same error as yours, and the problem was that the google
srs wasn't supplied with the jars. So i implemented it by myself. I
can't give you a copy for the moment, because i'm not on my own pc for
the moment. But basically, the only thing you need to do is grab the
wkt, and register it with geotools, then it should work for the whole
application.
grtz, w
On Sun, Dec 7, 2008 at 2:00 PM, Adrian Custer <[EMAIL PROTECTED]> wrote:
> Hey,
>
> Try using the base epsg jar as well. I don't think epsg-ext was meant to
> be used as a standalone but only along with the epsg jar.
>
> --adrian
>
>
> On Sun, 2008-12-07 at 17:35 +0530, Shyam Nagarajan wrote:
>> Hi,
>>
>>
>> I am using GeoTools 2.5.0. I want to project data in another CRS to
>> Google Mercator CRS. I was previously using WKT to create the Google
>> Mercator CRS.
>>
>> Since now we have an official EPSG code for the same I want to switch
>> over to that. Please find below the code that I have written.
>>
>> CRSAuthorityFactory factory = CRS.getAuthorityFactory(true);
>>
>> CoordinateReferenceSystem crs =
>> factory.createCoordinateReferenceSystem("EPSG:3785");
>>
>> The same code worked when I used EPSG:4326.
>>
>> I have added gt-epsg-extension-2.5.0.jar to the classpath. Even after
>> doing so I get the following exception:
>>
>> Exception in thread "main"
>> org.opengis.referencing.NoSuchAuthorityCodeException: No code
>> "EPSG:3785" from authority "European Petroleum Survey Group" found for
>> object of type "CoordinateReferenceSystem".
>>
>> at
>> org.geotools.referencing.factory.AbstractAuthorityFactory.noSuchAuthorityCode(AbstractAuthorityFactory.java:949)
>>
>> at
>> org.geotools.referencing.factory.epsg.DirectEpsgFactory.createCoordinateReferenceSystem(DirectEpsgFactory.java:2000)
>>
>> at
>> org.geotools.referencing.factory.BufferedAuthorityFactory.createCoordinateReferenceSystem(BufferedAuthorityFactory.java:781)
>>
>> at
>> org.geotools.referencing.factory.AuthorityFactoryAdapter.createCoordinateReferenceSystem(AuthorityFactoryAdapter.java:798)
>>
>> at
>> org.geotools.referencing.factory.BufferedAuthorityFactory.createCoordinateReferenceSystem(BufferedAuthorityFactory.java:781)
>>
>> at
>> org.geotools.referencing.factory.AuthorityFactoryAdapter.createCoordinateReferenceSystem(AuthorityFactoryAdapter.java:798)
>>
>> at
>> org.geotools.referencing.factory.FallbackAuthorityFactory.createCoordinateReferenceSystem(FallbackAuthorityFactory.java:638)
>>
>> at
>> org.geotools.referencing.factory.AuthorityFactoryAdapter.createCoordinateReferenceSystem(AuthorityFactoryAdapter.java:798)
>>
>> at
>> org.geotools.referencing.factory.ThreadedAuthorityFactory.createCoordinateReferenceSystem(ThreadedAuthorityFactory.java:729)
>>
>> at
>> org.geotools.referencing.DefaultAuthorityFactory.createCoordinateReferenceSystem(DefaultAuthorityFactory.java:179)
>>
>> at
>> com.cognizant.clips.data.utils.ShapeFileTransformer.getCoordinateReferenceSystem(ShapeFileTransformer.java:233)
>>
>> at
>> com.cognizant.clips.data.utils.ShapeFileTransformer.main(ShapeFileTransformer.java:90)
>>
>> I had a similar error when I used EPSG:900913.
>>
>> I referred to other posts and there was a mention that epsg-ext jar
>> had to be added to the classpath for this. I am assuming that the jar
>> referred to is gt-epsg-extension-2.5.0.jar. I have not configured any
>> EPSG databases. On checking the esri.properties file in
>> gt-epsg-extension-2.5.0.jar, I could not find an entry for 3785 and
>> 900913.
>>
>> Please let me know if I am missing something.
>>
>> Thanks and Regards,
>>
>> Shyam Sundar.N
>>
>> ------------------------------------------------------------------------------
>> SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
>> The future of the web can't happen without you. Join us at MIX09 to help
>> pave the way to the Next Web now. Learn more and register at
>> http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
>> _______________________________________________ Geotools-gt2-users mailing
>> list [email protected]
>> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>
>
> ------------------------------------------------------------------------------
> SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
> The future of the web can't happen without you. Join us at MIX09 to help
> pave the way to the Next Web now. Learn more and register at
> http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
> _______________________________________________
> Geotools-gt2-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>
------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you. Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users