Hope I am not being offtrack, but if you are looking for
quick'n'dirty'n'scripty, download proj4 and do something like:
echo "2 45" | proj +init=epsg:27572
Or if you want to go backwards into geographics:
echo "941943 2009361" | invproj +init=epsg:27572
Paul
On 2-Dec-05, at 7:52 AM, Peter Zankl wrote:
Hi Martin
THX a lot for your suggestions !
:-)))
> But you don't really need this WKT.
I would have preferred the WKT because it implies a copy/paste
operation instead of a download of the database, configure the
system etc. I develop on different machines and if I want to repeat
the transfromation I will have to configure each machine before
running it :-(
Anyway: trying the WKT gives me the following exception
> No transformation available from system
"GeographicCoordinateSystem(WGS84)"
> to "ProjectedCoordinateSystem(NTF (Paris) / Lambert zone II)".
> [...cut...]
> Caused by: org.geotools.ct.NoSuchClassificationException: No
transform for
> classification "Lambert Conic Conformal (1SP)".
maybe the WGS84 definition I took from a tutorial page is missing
something:
String TARGET_WKT = "GEOGCS[\"WGS84\", DATUM[\"WGS84\", SPHEROID
[\"WGS84\", 6378137.0, 298.257223563]], PRIMEM[\"Greenwich\", 0.0],
UNIT[\"degree\",0.017453292519943295], AXIS[\"Longitude\",EAST],
AXIS[\"Latitude\",NORTH]]";
Or maybe I could try to add TOWGS84[<seven param>] to the SourceWKT
(I think I saw a ToWGS84() methode somewhere...)
> But you don't really need this WKT. In yours code, just write
> CRSAuthorityFactory f = FactoryFinder.getCRSAuthorityFactory
("EPSG");
> CoordinateReferenceSystem crs = f.createCoordinateReferenceSystem
("27572");
As I got stuck with the WKT approach I downloaded the EPSG database
and configured a System Data Source for the Access file:
CRSAuthorityFactory f = FactoryFinder.getCRSAuthorityFactory
("EPSG",null);
try {
CoordinateReferenceSystem sourceCRS =
f.createCoordinateReferenceSystem("27572");
CoordinateReferenceSystem targetCRS =
f.createCoordinateReferenceSystem("7030");
} catch (FactoryException e1) {...}
Again I'm stuck with an exception:
> WARNING: Can't load a service for category DataSource.
> sun.misc.ServiceConfigurationError:
> org.geotools.referencing.factory.epsg.DataSource: Provider
> org.geotools.referencing.factory.epsg.PostgreDataSource could not
be instantiated: java.lang.NullPointerException
at sun.misc.Service.fail(Unknown Source)
at sun.misc.Service.access$200(Unknown Source)
Looks like i should read some further docs to access the *.mdb
Datasource instead of a Postgres driver...
...or switch to the hsql version.
time for a break
[let's kick some innocent wall without being caught by the "Protect-
Innocent-Walls-Ligue"...]
Thank you all for geotools, it looks like a really great tool.
It's the fact that I have limited understanding of the GIS business
in general that makes me stumblin around - it's a frustrating
experience to get nothing but exceptions for hours and hours...
Peter
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through
log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD
SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel