How to initialize the epsg stuff

11 messages Options
Embed this post
Permalink
Alexander Weidauer

How to initialize the epsg stuff

Reply Threaded More More options
Print post
Permalink
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Dear list,

I've a problem with goetools 2.5.5 with following behavior.
If I run my test application inside the netbeans ide the little test
program shows me the class path and the presence of
gt-epsg-wkt-2.5.5.jar

public static void main(String[] args) throws
NoSuchAuthorityCodeException, FactoryException {

        String s = System.getProperty("java.class.path");
        String[] f = s.split(":");

        System.out.println("classpath is:");

        for (int i = 0; i < f.length; i++) {
            if (f[i].contains("epsg")) {
                System.out.println("********************");
            }

            System.out.println(i + ": " + f[i]);
            if (f[i].contains("epsg")) {
                System.out.println("********************");
            }


        }
        System.out.println("\ntry to decode EPSG 4326:\n");
        try {

            CoordinateReferenceSystem crs = CRS.decode("EPSG:4326");

            System.out.println("coordinate system is:\n" +
                     crs.toString());

        } catch (Exception e) {

            System.out.println(e.getMessage());

        }
    }

If I run this code at the shell via

#!/bin/sh
pt=`pwd`;
cpn=`ls ${pt}/lib/*.jar`;
cpm=`echo ${cpn} | sed -e 's/ /:/g'`;
cpx=${cpm}:${pt}/imkonos-gui.jar
java -classpath ${cpx} de.huckfinn.gis.GisToolkit


classpath is:
0: /home/imkonos/Programme/Imkonos-1.0/Start/lib/AbsoluteLayout.jar
1: /home/imkonos/Programme/Imkonos-1.0/Start/lib/common-2.2.1.jar
2: /home/imkonos/Programme/Imkonos-1.0/Start/lib/commons-beanutils-1.7.0.jar
3: /home/imkonos/Programme/Imkonos-1.0/Start/lib/commons-cli-1.1.jar
4:
/home/imkonos/Programme/Imkonos-1.0/Start/lib/commons-cli-2.0-gt2-pre1.jar
5: /home/imkonos/Programme/Imkonos-1.0/Start/lib/commons-codec-1.2.jar
6: /home/imkonos/Programme/Imkonos-1.0/Start/lib/commons-collections-3.1.jar
7: /home/imkonos/Programme/Imkonos-1.0/Start/lib/commons-dbcp-1.2.2.jar
8:
/home/imkonos/Programme/Imkonos-1.0/Start/lib/commons-httpclient-3.0.1.jar
9: /home/imkonos/Programme/Imkonos-1.0/Start/lib/commons-io-1.4.jar
10: /home/imkonos/Programme/Imkonos-1.0/Start/lib/commons-jxpath-1.2.jar
11: /home/imkonos/Programme/Imkonos-1.0/Start/lib/commons-lang-2.1.jar
12: /home/imkonos/Programme/Imkonos-1.0/Start/lib/commons-logging-1.1.1.jar
13: /home/imkonos/Programme/Imkonos-1.0/Start/lib/commons-math-1.1.jar
14: /home/imkonos/Programme/Imkonos-1.0/Start/lib/commons-pool-1.3.jar
15: /home/imkonos/Programme/Imkonos-1.0/Start/lib/ecore-2.2.2.jar
16: /home/imkonos/Programme/Imkonos-1.0/Start/lib/geoapi-2.2.0.jar
17: /home/imkonos/Programme/Imkonos-1.0/Start/lib/gt-api-2.5.5.jar
18: /home/imkonos/Programme/Imkonos-1.0/Start/lib/gt-coverage-2.5.5.jar
19: /home/imkonos/Programme/Imkonos-1.0/Start/lib/gt-cql-2.5.5.jar
20: /home/imkonos/Programme/Imkonos-1.0/Start/lib/gt-data-2.5.5.jar
********************
21: /home/imkonos/Programme/Imkonos-1.0/Start/lib/gt-epsg-wkt-2.5.5.jar
********************
22: /home/imkonos/Programme/Imkonos-1.0/Start/lib/gt-geotiff-2.5.5.jar
23: /home/imkonos/Programme/Imkonos-1.0/Start/lib/gt-image-2.5.5.jar
24: /home/imkonos/Programme/Imkonos-1.0/Start/lib/gt-jdbc-2.5.5.jar
25: /home/imkonos/Programme/Imkonos-1.0/Start/lib/gt-legacy-2.5.5.jar
26: /home/imkonos/Programme/Imkonos-1.0/Start/lib/gt-libraryJTS-2.5.5.jar
27: /home/imkonos/Programme/Imkonos-1.0/Start/lib/gt-main-2.5.5.jar
28: /home/imkonos/Programme/Imkonos-1.0/Start/lib/gt-metadata-2.5.5.jar
29: /home/imkonos/Programme/Imkonos-1.0/Start/lib/gt-property-2.5.5.jar
30: /home/imkonos/Programme/Imkonos-1.0/Start/lib/gt-referencing-2.5.5.jar
31: /home/imkonos/Programme/Imkonos-1.0/Start/lib/gt-referencing3D-2.5.5.jar
32: /home/imkonos/Programme/Imkonos-1.0/Start/lib/gt-render-2.5.5.jar
33: /home/imkonos/Programme/Imkonos-1.0/Start/lib/gt-shapefile-2.5.5.jar
34: /home/imkonos/Programme/Imkonos-1.0/Start/lib/gt-temporal-2.5.5.jar
35: /home/imkonos/Programme/Imkonos-1.0/Start/lib/gt-validation-2.5.5.jar
36: /home/imkonos/Programme/Imkonos-1.0/Start/lib/gt-widgets-swing-2.5.5.jar
37: /home/imkonos/Programme/Imkonos-1.0/Start/lib/gt-xml-2.5.5.jar
38: /home/imkonos/Programme/Imkonos-1.0/Start/lib/gt-xsd-core-2.5.5.jar
39: /home/imkonos/Programme/Imkonos-1.0/Start/lib/gt-xsd-filter-2.5.5.jar
40: /home/imkonos/Programme/Imkonos-1.0/Start/lib/gt-xsd-gml2-2.5.5.jar
41: /home/imkonos/Programme/Imkonos-1.0/Start/lib/gt-xsd-gml3-2.5.5.jar
42: /home/imkonos/Programme/Imkonos-1.0/Start/lib/gt-xsd-kml-2.5.5.jar
43: /home/imkonos/Programme/Imkonos-1.0/Start/lib/gt-xsd-ows-2.5.5.jar
44: /home/imkonos/Programme/Imkonos-1.0/Start/lib/gt-xsd-sld-2.5.5.jar
45: /home/imkonos/Programme/Imkonos-1.0/Start/lib/gt-xsd-wcs-2.5.5.jar
46: /home/imkonos/Programme/Imkonos-1.0/Start/lib/gt-xsd-wfs-2.5.5.jar
47: /home/imkonos/Programme/Imkonos-1.0/Start/lib/gt-xsd-wps-2.5.5.jar
48:
/home/imkonos/Programme/Imkonos-1.0/Start/lib/imageio-ext-customstreams-1.0.1.jar
49: /home/imkonos/Programme/Imkonos-1.0/Start/lib/imkonos-io.jar
50: /home/imkonos/Programme/Imkonos-1.0/Start/lib/jama-1.0.2.jar
51: /home/imkonos/Programme/Imkonos-1.0/Start/lib/jdom-1.0.jar
52: /home/imkonos/Programme/Imkonos-1.0/Start/lib/jsqlparser-0.3.14.jar
53: /home/imkonos/Programme/Imkonos-1.0/Start/lib/jts-1.9.jar
54: /home/imkonos/Programme/Imkonos-1.0/Start/lib/log4j-1.2.12.jar
55: /home/imkonos/Programme/Imkonos-1.0/Start/lib/org.w3.xlink-2.5.1.jar
56: /home/imkonos/Programme/Imkonos-1.0/Start/lib/poi-3.2.jar
57: /home/imkonos/Programme/Imkonos-1.0/Start/lib/postgis_1.3.2.jar
58: /home/imkonos/Programme/Imkonos-1.0/Start/imkonos-gui.jar

try to decode EPSG 4326:

No factory of kind "MathTransformFactory" found.

The execution fails. Is there a possibilitiy to call the lib/jar

21: /home/imkonos/Programme/Imkonos-1.0/Start/lib/gt-epsg-wkt-2.5.5.jar

explicitly. Thanks



- --
Alexander Weidauer
    __________________ _    __      ______  ______
   /  _/ __/ ____/ __ \ |  / /     /  _/  |/  /   |
   / // /_/ / __/ / / / | / /_____ / // /|_/ / /| |
 _/ // __/ /_/ / /_/ /| |/ /_____// // /  / / ___ |
/___/_/  \____/_____/ |___/     /___/_/  /_/_/  |_|

Institut für Geodatenverarbeitung
Informationsdienste, -modelle und -applikationen
Tel.: 038333-527
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.4-svn0 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iD8DBQFKSQL3MC1o6iopHygRAuXcAJ497xCYUHakvShFMNT2kgXYtyDx0ACghnVl
bVVQ3TQfq5kmJ3q8b2pJrqM=
=S3mJ
-----END PGP SIGNATURE-----

------------------------------------------------------------------------------
_______________________________________________
Geotools-gt2-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
mbedward

Re: How to initialize the epsg stuff

Reply Threaded More More options
Print post
Permalink
Hi Alexander

It's very puzzling.  I'm hoping that someone else will be able to spot
the problem but meanwhile can I suggest that you try using
gt-epsg-hsql instead of gt-epsg-wkt and see if that makes a
difference.

Michael

------------------------------------------------------------------------------
_______________________________________________
Geotools-gt2-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
mbedward

Re: How to initialize the epsg stuff

Reply Threaded More More options
Print post
Permalink
Oops - just saw that you were also talking about epsg with Jody on
another thread so perhaps gt-epsg-hsql is not feasible for you.

Michael

------------------------------------------------------------------------------
_______________________________________________
Geotools-gt2-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
Alexander Weidauer

Re: How to initialize the epsg stuff

Reply Threaded More More options
Print post
Permalink
In reply to this post by mbedward
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Michael Bedward schrieb:
> Hi Alexander
>
> It's very puzzling.  I'm hoping that someone else will be able to spot
> the problem but meanwhile can I suggest that you try using
> gt-epsg-hsql instead of gt-epsg-wkt and see if that makes a
> difference.
>
> Michael
>
 Hi Michael,

thank you for your fast reply. Yes you are right, the gt-epsg-wkt is one
of the little trouble maker in this context. It produces in some cases
p.h. epsg:3035 an ecxeption BursaWolfParameters are missing at runtime.
But there are more problems. My approach was to set up a simple
read/write context for shapefiles and geotiff with JTS as vector
backplane and EPSG as a SRS schema. The question was what are the
nessesary jar files to do that using netbeans without a maven
environment. The depencies are not clear determinable from your docs like

http://docs.codehaus.org/display/GEOTDOC/02+Meet+the+GeoTools+Library#02MeettheGeoToolsLibrary-MeettheLibrary

May be I have overseen something. For a minimal "jar" setup inside. I
find out this constellation to get things work in a very basic way:

geoapi-2.2.0.jar
gt-api-2.5.5.jar
gt-coverage-2.5.5.jar
gt-cql-2.5.5.jar
gt-data-2.5.5.jar
gt-epsg-extension-2.5.5.jar
gt-epsg-wkt-2.5.5.jar
gt-geotiff-2.5.5.jar
gt-jdbc-2.5.5.jar
gt-legacy-2.5.5.jar
gt-main-2.5.5.jar
gt-metadata-2.5.5.jar
gt-property-2.5.5.jar
gt-referencing-2.5.5.jar
gt-render-2.5.5.jar
gt-sample-data-2.5.5.jar
gt-shapefile-2.5.5.jar
gt-xml-2.5.5.jar
jsr-275-1.0-beta-2.jar
vecmath-1.3.1.jar


Unfortunally jsr-275-1.0-beta-2.jar and  vecmath-1.3.1.jar are not
marked as mandatory if you work with things like CRS.decode(...). A
second problem is, that I don't find out and understand how the
embedding of functional plugins really works in the geotools context.

- ----------------------------------------------------------------------
Sometimes you have to prevent the usage of more than two plugins like
the "epsg-backplans".  Sometimes you can put everything together. So you
get some side effects by the deployment mechanism of the. Netbeans uses
here the MANIFEST.MF to adress the jar files for the application.

Manifest-Version: 1.0
Ant-Version: Apache Ant 1.7.1
Created-By: 11.0-b11 (Sun Microsystems Inc.)
Main-Class: gtools.Main
Class-Path: lib/geoapi-2.2.0.jar lib/gt-api-2.5.5.jar lib/gt-coverage-
 2.5.5.jar lib/gt-cql-2.5.5.jar lib/gt-data-2.5.5.jar lib/gt-epsg-exte
 nsion-2.5.5.jar lib/gt-epsg-wkt-2.5.5.jar lib/gt-geotiff-2.5.5.jar li
 b/gt-jdbc-2.5.5.jar lib/gt-legacy-2.5.5.jar lib/gt-main-2.5.5.jar lib
 /gt-metadata-2.5.5.jar lib/gt-property-2.5.5.jar lib/gt-referencing-2
 .5.5.jar lib/gt-render-2.5.5.jar lib/gt-sample-data-2.5.5.jar lib/gt-
 shapefile-2.5.5.jar lib/gt-xml-2.5.5.jar lib/jsr-275-1.0-beta-2.jar l
 ib/vecmath-1.3.1.jar
X-COMMENT: Main-Class will be added automatically by build

Normally you can call your main application simply

java -jar geotools-test.jar

with a lib directory inside your application path.

But if you use this geotools will not find the plugins. You hav to use a
more explicit way to declare what is a classpat like this:
#!/bin/sh

# set the java home directory
JAVA_HOME=/usr/java/jdk1.6.0_10

# where am I
local_path=`pwd`;

# collect all the jars from the lib directory
local_libs=`ls ${local_path}/lib/*.jar`;

# replace all spaces with :
local_libs_classpath=`echo ${local_libs} | sed -e 's/ /:/g'`;

# add the application to the classpath
application_classpath=${local_libs_classpath}:${local_path}/gtools-test.jar

# start the application
$JAVA_HOME/bin/java -classpath ${application_classpath} gtools.Main


- ----------------------------------------------------------------------
My questions are:

Is there a tech-paper with a depency tree, cases what side effects usage
of the jar files have?

Are there transparent possibilities (outside the maven enviroment) to
give more detailed messages what is missed really and when to get a
production stable set of jar files or is the depency tree not so simple
an unique?

What things reallizing all the other packages delivered with the library
Geotools - 2.5.5 and are there groups for usage? Is there a
tech-documentation? I ask for things like this 2.5.2 and 2.5.5

net.opengis.ows-2.5.1.jar
net.opengis.ows-2.5.5.jar
net.opengis.wcs-2.5.1.jar
net.opengis.wcs-2.5.5.jar
net.opengis.wfs-2.5.1.jar
net.opengis.wfs-2.5.5.jar
net.opengis.wfsv-2.5.1.jar
net.opengis.wfsv-2.5.5.jar
net.opengis.wps-2.5.1.jar
net.opengis.wps-2.5.5.jar

I ask for things like this 1.0-SNAPSHOT  and 1.0.1

imageio-ext-arcgrid-1.0-SNAPSHOT.jar
imageio-ext-arcgrid-1.0.1.jar
imageio-ext-customstreams-1.0-SNAPSHOT.jar
imageio-ext-customstreams-1.0.1.jar
imageio-ext-gdal-1.0.1.jar
imageio-ext-gdaldted-1.0.1.jar
imageio-ext-gdalecw-1.0.1.jar
imageio-ext-gdalecwjp2-1.0.1.jar
imageio-ext-gdalehdr-1.0.1.jar
imageio-ext-gdalerdasimg-1.0.1.jar
imageio-ext-gdalframework-1.0.1.jar
imageio-ext-gdalkakadujp2-1.0.1.jar
imageio-ext-gdalmrsid-1.0.1.jar
imageio-ext-gdalmrsidjp2-1.0.1.jar
imageio-ext-gdalnitf-1.0.1.jar
imageio-ext-geocore-1.0.1.jar
imageio-ext-imagereadmt-1.0.1.jar
imageio-ext-tiff-1.0.1.jar
imageio-ext-utilities-1.0.1.jar
....


- ----------------------------------------------------------------
For my tool I find out (after a very long night of try and error
sessions) that a minimal constallation for the geotool libs is:

geoapi-2.2.0.jar
gt-api-2.5.5.jar
gt-coverage-2.5.5.jar
gt-cql-2.5.5.jar
gt-data-2.5.5.jar
gt-epsg-extension-2.5.5.jar
gt-epsg-hsql-2.5.5.jar
gt-geotiff-2.5.5.jar
gt-jdbc-2.5.5.jar
gt-legacy-2.5.5.jar
gt-main-2.5.5.jar
gt-metadata-2.5.5.jar
gt-property-2.5.5.jar
gt-referencing-2.5.5.jar
gt-render-2.5.5.jar
gt-sample-data-2.5.5.jar
gt-shapefile-2.5.5.jar
gt-xml-2.5.5.jar
jsr-275-1.0-beta-2.jar
vecmath-1.3.1.jar
hsqldb-1.8.0.7.jar
jai_codec-1.1.3.jar
jai_imageio-1.1.jar
jts-1.9.jar

.

- --
Alexander Weidauer
    __________________ _    __      ______  ______
   /  _/ __/ ____/ __ \ |  / /     /  _/  |/  /   |
   / // /_/ / __/ / / / | / /_____ / // /|_/ / /| |
 _/ // __/ /_/ / /_/ /| |/ /_____// // /  / / ___ |
/___/_/  \____/_____/ |___/     /___/_/  /_/_/  |_|

Institut für Geodatenverarbeitung
Informationsdienste, -modelle und -applikationen
Tel.: 038333-527
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.4-svn0 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iD8DBQFKScXBMC1o6iopHygRApjwAJ0ZZQdJ2zPNFeaHzykNLcyqT6dkhQCfbvJw
/KpbM5IMYUPK0ejeih6Gnqw=
=m0DK
-----END PGP SIGNATURE-----

------------------------------------------------------------------------------
_______________________________________________
Geotools-gt2-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
aaime

Re: How to initialize the epsg stuff

Reply Threaded More More options
Print post
Permalink
Alexander Weidauer ha scritto:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Michael Bedward schrieb:
>> Hi Alexander
>>
>> It's very puzzling.  I'm hoping that someone else will be able to spot
>> the problem but meanwhile can I suggest that you try using
>> gt-epsg-hsql instead of gt-epsg-wkt and see if that makes a
>> difference.
>>
>> Michael
>>
>  Hi Michael,
>
> thank you for your fast reply. Yes you are right, the gt-epsg-wkt is one
> of the little trouble maker in this context. It produces in some cases
> p.h. epsg:3035 an ecxeption BursaWolfParameters are missing at runtime.
> But there are more problems. My approach was to set up a simple
> read/write context for shapefiles and geotiff with JTS as vector
> backplane and EPSG as a SRS schema. The question was what are the
> nessesary jar files to do that using netbeans without a maven
> environment. The depencies are not clear determinable from your docs like
>
> http://docs.codehaus.org/display/GEOTDOC/02+Meet+the+GeoTools+Library#02MeettheGeoToolsLibrary-MeettheLibrary
>
> May be I have overseen something. For a minimal "jar" setup inside. I
> find out this constellation to get things work in a very basic way:
>
> geoapi-2.2.0.jar
> gt-api-2.5.5.jar
> gt-coverage-2.5.5.jar
> gt-cql-2.5.5.jar
> gt-data-2.5.5.jar
> gt-epsg-extension-2.5.5.jar
> gt-epsg-wkt-2.5.5.jar
> gt-geotiff-2.5.5.jar
> gt-jdbc-2.5.5.jar
> gt-legacy-2.5.5.jar
> gt-main-2.5.5.jar
> gt-metadata-2.5.5.jar
> gt-property-2.5.5.jar
> gt-referencing-2.5.5.jar
> gt-render-2.5.5.jar
> gt-sample-data-2.5.5.jar
> gt-shapefile-2.5.5.jar
> gt-xml-2.5.5.jar
> jsr-275-1.0-beta-2.jar
> vecmath-1.3.1.jar
>
>
> Unfortunally jsr-275-1.0-beta-2.jar and  vecmath-1.3.1.jar are not
> marked as mandatory if you work with things like CRS.decode(...). A
> second problem is, that I don't find out and understand how the
> embedding of functional plugins really works in the geotools context.

The list of dependencies per module you want to use is easy to
determine, unpack the jar you want to use at hand and look into its
META-INF contents, there should be an entry with the full class-path
required.

The plugin system uses SPI, the Service Provider Interface, a mechanism
that requires the presence of certain registration files in
META-INF/services and the classpath to be freely reachable.
This breaks big time in OSGI enviroments where the classpath access is
divided into compartments, so for Eclipse plugin writing special
precautions need to be taken (ask on the uDig ml to see what they did
if this is your case).

I just used this little program against epsg-wkt only:

import org.geotools.referencing.CRS;
import org.opengis.referencing.crs.CoordinateReferenceSystem;


public class EpsgWktSample {
        public static void main(String[] args) throws Exception {
                CoordinateReferenceSystem epsg4326 = CRS.decode("EPSG:4326");
                System.out.println(epsg4326);
                CoordinateReferenceSystem epsg3035 = CRS.decode("EPSG:3035");
                System.out.println(epsg3035);
                System.out.println(CRS.findMathTransform(epsg3035, epsg4326, true));
        }
}


and it worked just fine for me? The trick for the missing Bursa-Wolf
parameters is to ask teh referencing subsystem to create a lenient
transform. Mind that without the Bursa-Wolf parameters you might incur
in very significant reprojection errors (in the order of the hundred
of meters or more).

As a workaround you can hand modify the property file inside the
epsg-wkt plugin to use the results of a decode performed against
the epsg-hsql plugin (get the definitions out of it, minding the
axix order by using CRS.decode(code, true), turn them into wkt
and replace them into the epsg-wkt property file).

Hope this helps
Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

------------------------------------------------------------------------------
_______________________________________________
Geotools-gt2-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
Vivien VD. DELESSE

GML Parser geotools 2.2.2

Reply Threaded More More options
Print post
Permalink
In reply to this post by Alexander Weidauer
Hi list,

I'm trying to make a GML parser with geotools 2.2.2,

Here is my code,

URI gmlFile = new File("/test.gml").toURI();

FileGMLDataStore store = new FileGMLDataStore(gmlFile, 10, 10000);

String[] TypeName = store.getTypeNames();
                         
FeatureSource fs = store.getFeatureSource(TypeName[0]);
FeatureCollection fc = fs.getFeatures();
FeatureIterator I = fc.features();
                     
FeatureReader fr = fc.reader();

while(I.hasNext()){
        Feature f = (Feature)I.next();
        System.out.println(f.getBounds().toString());
}

It makes me an error during the creation of the FeatureSource,





------------------------------------------------------------------------------
_______________________________________________
Geotools-gt2-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
Alexander Weidauer

Re: How to initialize the epsg stuff

Reply Threaded More More options
Print post
Permalink
In reply to this post by aaime
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Andrea Aime schrieb:

> Alexander Weidauer ha scritto:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> Michael Bedward schrieb:
>>> Hi Alexander
>>>
>>> It's very puzzling.  I'm hoping that someone else will be able to spot
>>> the problem but meanwhile can I suggest that you try using
>>> gt-epsg-hsql instead of gt-epsg-wkt and see if that makes a
>>> difference.
>>>
>>> Michael
>>>
>>  Hi Michael,
>>
>> thank you for your fast reply. Yes you are right, the gt-epsg-wkt is one
>> of the little trouble maker in this context. It produces in some cases
>> p.h. epsg:3035 an ecxeption BursaWolfParameters are missing at runtime.
>> But there are more problems. My approach was to set up a simple
>> read/write context for shapefiles and geotiff with JTS as vector
>> backplane and EPSG as a SRS schema. The question was what are the
>> nessesary jar files to do that using netbeans without a maven
>> environment. The depencies are not clear determinable from your docs like
>>
>> http://docs.codehaus.org/display/GEOTDOC/02+Meet+the+GeoTools+Library#02MeettheGeoToolsLibrary-MeettheLibrary
>>
>>
>> May be I have overseen something. For a minimal "jar" setup inside. I
>> find out this constellation to get things work in a very basic way:
>>
>> geoapi-2.2.0.jar
>> gt-api-2.5.5.jar
>> gt-coverage-2.5.5.jar
>> gt-cql-2.5.5.jar
>> gt-data-2.5.5.jar
>> gt-epsg-extension-2.5.5.jar
>> gt-epsg-wkt-2.5.5.jar
>> gt-geotiff-2.5.5.jar
>> gt-jdbc-2.5.5.jar
>> gt-legacy-2.5.5.jar
>> gt-main-2.5.5.jar
>> gt-metadata-2.5.5.jar
>> gt-property-2.5.5.jar
>> gt-referencing-2.5.5.jar
>> gt-render-2.5.5.jar
>> gt-sample-data-2.5.5.jar
>> gt-shapefile-2.5.5.jar
>> gt-xml-2.5.5.jar
>> jsr-275-1.0-beta-2.jar
>> vecmath-1.3.1.jar
>>
>>
>> Unfortunally jsr-275-1.0-beta-2.jar and  vecmath-1.3.1.jar are not
>> marked as mandatory if you work with things like CRS.decode(...). A
>> second problem is, that I don't find out and understand how the
>> embedding of functional plugins really works in the geotools context.
>
> The list of dependencies per module you want to use is easy to
> determine, unpack the jar you want to use at hand and look into its
> META-INF contents, there should be an entry with the full class-path
> required.
>
> The plugin system uses SPI, the Service Provider Interface, a mechanism
> that requires the presence of certain registration files in
> META-INF/services and the classpath to be freely reachable.
> This breaks big time in OSGI enviroments where the classpath access is
> divided into compartments, so for Eclipse plugin writing special
> precautions need to be taken (ask on the uDig ml to see what they did
> if this is your case).
>
> I just used this little program against epsg-wkt only:
>
> import org.geotools.referencing.CRS;
> import org.opengis.referencing.crs.CoordinateReferenceSystem;
>
>
> public class EpsgWktSample {
>     public static void main(String[] args) throws Exception {
>         CoordinateReferenceSystem epsg4326 = CRS.decode("EPSG:4326");
>         System.out.println(epsg4326);
>         CoordinateReferenceSystem epsg3035 = CRS.decode("EPSG:3035");
>         System.out.println(epsg3035);
>         System.out.println(CRS.findMathTransform(epsg3035, epsg4326,
> true));
>     }
> }
>
>
> and it worked just fine for me? The trick for the missing Bursa-Wolf
> parameters is to ask teh referencing subsystem to create a lenient
> transform. Mind that without the Bursa-Wolf parameters you might incur
> in very significant reprojection errors (in the order of the hundred
> of meters or more).
>
> As a workaround you can hand modify the property file inside the
> epsg-wkt plugin to use the results of a decode performed against
> the epsg-hsql plugin (get the definitions out of it, minding the
> axix order by using CRS.decode(code, true), turn them into wkt
> and replace them into the epsg-wkt property file).
>
> Hope this helps
> Cheers
> Andrea
>
 Thank you Andrea for your fast reply. To investigate the MANIFEST.MF
files is a fast and easy to use solution. May be I've to change the
development platform from netbeans to eclipse to have a deeper insigth
to the geotools source tree and plugin structure. The advice to OGSI
gives me a clue where I have to start. Thanks

- --
Alexander Weidauer
    __________________ _    __      ______  ______
   /  _/ __/ ____/ __ \ |  / /     /  _/  |/  /   |
   / // /_/ / __/ / / / | / /_____ / // /|_/ / /| |
 _/ // __/ /_/ / /_/ /| |/ /_____// // /  / / ___ |
/___/_/  \____/_____/ |___/     /___/_/  /_/_/  |_|

Institut für Geodatenverarbeitung
Informationsdienste, -modelle und -applikationen
Tel.: 038333-527
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.4-svn0 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iD8DBQFKSiY3MC1o6iopHygRAvEuAJ9Eua9Gt5DEWX1Xh21a4EvjPM9AxQCdGMw2
H3hhpjuOoficmTXNRk30ei0=
=JC3A
-----END PGP SIGNATURE-----

------------------------------------------------------------------------------
_______________________________________________
Geotools-gt2-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
Justin Deoliveira

Re: GML Parser geotools 2.2.2

Reply Threaded More More options
Print post
Permalink
In reply to this post by Vivien VD. DELESSE
Hi,

Unfortunately the code you are inquiring about is quite old, and at this
point unmaintained. Can you upgrade your version of geotools to 2.5?
There are new ways available for parsing GML:

http://docs.codehaus.org/display/GEOTDOC/GML+XML+Support

-Justin

Vivien VD. DELESSE wrote:

> Hi list,
>
> I'm trying to make a GML parser with geotools 2.2.2,
>
> Here is my code,
>
> URI gmlFile = new File("/test.gml").toURI();
>
> FileGMLDataStore store = new FileGMLDataStore(gmlFile, 10, 10000);
>
> String[] TypeName = store.getTypeNames();
>
> FeatureSource fs = store.getFeatureSource(TypeName[0]);
> FeatureCollection fc = fs.getFeatures();
> FeatureIterator I = fc.features();
>    
> FeatureReader fr = fc.reader();
>
> while(I.hasNext()){
> Feature f = (Feature)I.next();
> System.out.println(f.getBounds().toString());
> }
>
> It makes me an error during the creation of the FeatureSource,
>
>
>
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Geotools-gt2-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users


--
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.

------------------------------------------------------------------------------
_______________________________________________
Geotools-gt2-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
Vivien VD. DELESSE

Re: GML Parser geotools 2.2.2

Reply Threaded More More options
Print post
Permalink
Yes, I have already made it with 2.5, but my company use Web Services
developed with geotools 2.2 and we can't upgrade all WS with 2.5. That why
I'm trying to make it with geotools 2.2. I don't understand why my code is
wrong
 
Thanks,

-Vivien

-----Message d'origine-----
De : Justin Deoliveira [mailto:[hidden email]]
Envoyé : samedi 4 juillet 2009 11:46
À : Vivien VD. DELESSE
Cc : [hidden email]
Objet : Re: [Geotools-gt2-users] GML Parser geotools 2.2.2

Hi,

Unfortunately the code you are inquiring about is quite old, and at this
point unmaintained. Can you upgrade your version of geotools to 2.5?
There are new ways available for parsing GML:

http://docs.codehaus.org/display/GEOTDOC/GML+XML+Support

-Justin

Vivien VD. DELESSE wrote:

> Hi list,
>
> I'm trying to make a GML parser with geotools 2.2.2,
>
> Here is my code,
>
> URI gmlFile = new File("/test.gml").toURI();
>
> FileGMLDataStore store = new FileGMLDataStore(gmlFile, 10, 10000);
>
> String[] TypeName = store.getTypeNames();
>
> FeatureSource fs = store.getFeatureSource(TypeName[0]);
> FeatureCollection fc = fs.getFeatures();
> FeatureIterator I = fc.features();
>    
> FeatureReader fr = fc.reader();
>
> while(I.hasNext()){
> Feature f = (Feature)I.next();
> System.out.println(f.getBounds().toString());
> }
>
> It makes me an error during the creation of the FeatureSource,
>
>
>
>
>
>
----------------------------------------------------------------------------
--
> _______________________________________________
> Geotools-gt2-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users


--
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.


------------------------------------------------------------------------------
_______________________________________________
Geotools-gt2-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
Jody Garnett-2

Re: GML Parser geotools 2.2.2

Reply Threaded More More options
Print post
Permalink
Is that OpenIMF you are using then?

The uDig project makes use of GeoTools 2.2.x still; so we are willing  
to issue a new release if you can supply a patch.

Jody

On 06/07/2009, at 5:11 PM, vd wrote:

> Yes, I have already made it with 2.5, but my company use Web Services
> developed with geotools 2.2 and we can't upgrade all WS with 2.5.  
> That why
> I'm trying to make it with geotools 2.2. I don't understand why my  
> code is
> wrong
>
> Thanks,
>
> -Vivien
>
> -----Message d'origine-----
> De : Justin Deoliveira [mailto:[hidden email]]
> Envoyé : samedi 4 juillet 2009 11:46
> À : Vivien VD. DELESSE
> Cc : [hidden email]
> Objet : Re: [Geotools-gt2-users] GML Parser geotools 2.2.2
>
> Hi,
>
> Unfortunately the code you are inquiring about is quite old, and at  
> this
> point unmaintained. Can you upgrade your version of geotools to 2.5?
> There are new ways available for parsing GML:
>
> http://docs.codehaus.org/display/GEOTDOC/GML+XML+Support
>
> -Justin
>
> Vivien VD. DELESSE wrote:
>> Hi list,
>>
>> I'm trying to make a GML parser with geotools 2.2.2,
>>
>> Here is my code,
>>
>> URI gmlFile = new File("/test.gml").toURI();
>>
>> FileGMLDataStore store = new FileGMLDataStore(gmlFile, 10, 10000);
>>
>> String[] TypeName = store.getTypeNames();
>>
>> FeatureSource fs = store.getFeatureSource(TypeName[0]);
>> FeatureCollection fc = fs.getFeatures();
>> FeatureIterator I = fc.features();
>>
>> FeatureReader fr = fc.reader();
>>
>> while(I.hasNext()){
>> Feature f = (Feature)I.next();
>> System.out.println(f.getBounds().toString());
>> }
>>
>> It makes me an error during the creation of the FeatureSource,
>>
>>
>>
>>
>>
>>
> ----------------------------------------------------------------------------
> --
>> _______________________________________________
>> Geotools-gt2-users mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>
>
> --
> Justin Deoliveira
> OpenGeo - http://opengeo.org
> Enterprise support for open source geospatial.
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Geotools-gt2-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users


------------------------------------------------------------------------------
_______________________________________________
Geotools-gt2-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
Vivien VD. DELESSE

Re: GML Parser geotools 2.2.2

Reply Threaded More More options
Print post
Permalink
Thanks about it, but now I change my plans. Instead of gml will use a wkt
parser which is working well. My application will send to my WS a string
wkt.

I will take a look to OpenIMF and uDig project.

Regards,

-----Message d'origine-----
De : Jody Garnett [mailto:[hidden email]]
Envoyé : lundi 6 juillet 2009 14:06
À : vd
Cc : 'Justin Deoliveira'; [hidden email]
Objet : Re: [Geotools-gt2-users] GML Parser geotools 2.2.2

Is that OpenIMF you are using then?

The uDig project makes use of GeoTools 2.2.x still; so we are willing  
to issue a new release if you can supply a patch.

Jody

On 06/07/2009, at 5:11 PM, vd wrote:

> Yes, I have already made it with 2.5, but my company use Web Services
> developed with geotools 2.2 and we can't upgrade all WS with 2.5.  
> That why
> I'm trying to make it with geotools 2.2. I don't understand why my  
> code is
> wrong
>
> Thanks,
>
> -Vivien
>
> -----Message d'origine-----
> De : Justin Deoliveira [mailto:[hidden email]]
> Envoyé : samedi 4 juillet 2009 11:46
> À : Vivien VD. DELESSE
> Cc : [hidden email]
> Objet : Re: [Geotools-gt2-users] GML Parser geotools 2.2.2
>
> Hi,
>
> Unfortunately the code you are inquiring about is quite old, and at  
> this
> point unmaintained. Can you upgrade your version of geotools to 2.5?
> There are new ways available for parsing GML:
>
> http://docs.codehaus.org/display/GEOTDOC/GML+XML+Support
>
> -Justin
>
> Vivien VD. DELESSE wrote:
>> Hi list,
>>
>> I'm trying to make a GML parser with geotools 2.2.2,
>>
>> Here is my code,
>>
>> URI gmlFile = new File("/test.gml").toURI();
>>
>> FileGMLDataStore store = new FileGMLDataStore(gmlFile, 10, 10000);
>>
>> String[] TypeName = store.getTypeNames();
>>
>> FeatureSource fs = store.getFeatureSource(TypeName[0]);
>> FeatureCollection fc = fs.getFeatures();
>> FeatureIterator I = fc.features();
>>
>> FeatureReader fr = fc.reader();
>>
>> while(I.hasNext()){
>> Feature f = (Feature)I.next();
>> System.out.println(f.getBounds().toString());
>> }
>>
>> It makes me an error during the creation of the FeatureSource,
>>
>>
>>
>>
>>
>>
>
----------------------------------------------------------------------------

> --
>> _______________________________________________
>> Geotools-gt2-users mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>
>
> --
> Justin Deoliveira
> OpenGeo - http://opengeo.org
> Enterprise support for open source geospatial.
>
>
>
----------------------------------------------------------------------------
--
> _______________________________________________
> Geotools-gt2-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users


------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time,
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize
details at: http://p.sf.net/sfu/blackberry
_______________________________________________
Geotools-gt2-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users