Screenshot instructions:
Windows
Mac
Red Hat Linux
Ubuntu
Click URL instructions:
Rightclick on ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)
From: Martin Kindler <kindlerm@ar...>  20040929 09:42:39

Hi list, please excuse me, if this posting appears twice (because of my eMail configuration the first try to post was sent to the list moderator) I am an absolute beginner in GIS and geotools. There is a problem I have in getting started with geotools2: I downloaded the binary diestribution of 2.0RC1 and tried a little example from Martin Desruisseaux (TransformationConsole). Trying to compile it fails because of "org.opengis.referencing.FactoryException" not found. Looking at the source of org.geotools.cs.FactoryException I see, that this class extends the missing one (in contrast to the javadoc). Which package has to be installed to get this resolved? Also I do need some general advice: Currently I am working in a project where I need a little GIS functionality: I have to do a topological search on a data base comprising a few hundred (maximally a few thousand) items. For each of the items I have the geographical coordinates (dms using WGS84 (I barely understand what this is, but OK)). I want to transform them to UTM to get a grid where I can implement a trivial search like "give me all objects in the current and all direct neighbour grid squares". Any grid would do, but using one which is included in many maps helps. Good idea??? Bad idea??? I am looking for a java function which does just this transformation. Geotools might be a bit of an overkill!? But anyway: the TransformationConsole example seems to do exactly what I want (given I get the parameters right), correct? Can anyone please give me some advice? I do not have the time to dive deeply into cocrdinate systems and projections and all the (interesting) stuff involved. Thanks in advance Martin Kindler 
From: Martin Desruisseaux <martin.desruisseaux@te...>  20040929 23:15:01

Martin Kindler a =E9crit : > There is a problem I have in getting started with geotools2: I > downloaded the binary diestribution of 2.0RC1 and tried a little exampl= e > from Martin Desruisseaux (TransformationConsole). Trying to compile it > fails because of "org.opengis.referencing.FactoryException" not found. > Looking at the source of org.geotools.cs.FactoryException I see, that > this class extends the missing one (in contrast to the javadoc). Which > package has to be installed to get this resolved? Everything in the 'org.opengis' package (and subpackage) are interfaces=20 developpeded in a separated project: http://geoapi.sourceforge.net. You=20 can download a opengis.jar file from this site. However, I'm not sure=20 that the version in the latest snapshot is the same than the one=20 expected by geotools 2.0RC1. We should also note that the referencing package in Geotools is under=20 extensive refactoring right now, in order to make it more compliant to=20 latest OpenGIS specification. This work is under way right now: expect a=20 new API in about 2 weeks. > Currently I am working in a project where I need a little GIS > functionality: I have to do a topological search on a data base > comprising a few hundred (maximally a few thousand) items. For each of > the items I have the geographical coordinates (dms using WGS84 (I barel= y > understand what this is, but OK)). I want to transform them to UTM to > get a grid where I can implement a trivial search like "give me all > objects in the current and all direct neighbour grid squares". Any grid > would do, but using one which is included in many maps helps. >=20 > Good idea??? Bad idea??? >=20 > I am looking for a java function which does just this transformation. > Geotools might be a bit of an overkill!? But anyway: the > TransformationConsole example seems to do exactly what I want (given I > get the parameters right), correct? My understanding is that you do your own search in yours database (i.e.=20 don't use one of DataStore provided in Geotools). In this case, the=20 referencing package in geotools may help you to performs the projections=20 on the fly. First, I suggest that you install the EPSG database: http://www.espg.org Next, open it (assuming you have Microsoft Access), click on "Browse=20 Coordinate Reference System" and find the UTM projection you are=20 interrested in (there is many). This database contains all parameters=20 for more that 3500 coordinate reference systems. Once you have found the CRS of interest, note the EPSG code (a 4 digits=20 number). You can then use CoordinateSystemEPSGFactory in order to=20 construct automatically a full CRS from its EPSG code (this is the=20 easiest way, if you know this EPSG code). The rest is similar to=20 TransformConsole example. Martin. 
From: Rueben Schulz <r_j_schulz@ya...>  20040930 04:58:00

On Wed, 20040929 at 16:14, Martin Desruisseaux wrote: > Martin Kindler a =E9crit : > > > There is a problem I have in getting started with geotools2: I > > downloaded the binary diestribution of 2.0RC1 and tried a little exa= mple > > from Martin Desruisseaux (TransformationConsole). Trying to compile = it > > fails because of "org.opengis.referencing.FactoryException" not foun= d. > > Looking at the source of org.geotools.cs.FactoryException I see, tha= t > > this class extends the missing one (in contrast to the javadoc). Whi= ch > > package has to be installed to get this resolved? > > Everything in the 'org.opengis' package (and subpackage) are interfac= es > developpeded in a separated project: http://geoapi.sourceforge.net. Yo= u > can download a opengis.jar file from this site. However, I'm not sure > that the version in the latest snapshot is the same than the one > expected by geotools 2.0RC1. A snapshot, that works, of geoapi should be included with the geotools 2.0RC1 release. 
From: Martin Kindler <kindlerm@ar...>  20041001 15:46:06

Thank you Martin and Rueben! I got a running function based on your advice. Martin Urspr=FCngliche Nachricht Von: geotoolsgt2usersadmin@... [mailto:geotoolsgt2usersadmin@...] Im Auftrag von Martin Desruisseaux Gesendet: Donnerstag, 30. September 2004 01:14 An: kindlerm@... Cc: geotoolsgt2users@... Betreff: Re: [Geotoolsgt2users] [Newbie] Help and advice needed Martin Kindler a =E9crit : > There is a problem I have in getting started with geotools2: I=20 > downloaded the binary diestribution of 2.0RC1 and tried a little=20 > example from Martin Desruisseaux (TransformationConsole). Trying to=20 > compile it fails because of "org.opengis.referencing.FactoryException" > not found. Looking at the source of org.geotools.cs.FactoryException I > see, that this class extends the missing one (in contrast to the=20 > javadoc). Which package has to be installed to get this resolved? Everything in the 'org.opengis' package (and subpackage) are interfaces developpeded in a separated project: http://geoapi.sourceforge.net. You=20 can download a opengis.jar file from this site. However, I'm not sure=20 that the version in the latest snapshot is the same than the one=20 expected by geotools 2.0RC1. We should also note that the referencing package in Geotools is under=20 extensive refactoring right now, in order to make it more compliant to=20 latest OpenGIS specification. This work is under way right now: expect a new API in about 2 weeks. > Currently I am working in a project where I need a little GIS > functionality: I have to do a topological search on a data base=20 > comprising a few hundred (maximally a few thousand) items. For each=20 > of the items I have the geographical coordinates (dms using WGS84 (I=20 > barely understand what this is, but OK)). I want to transform them to=20 > UTM to get a grid where I can implement a trivial search like "give me > all objects in the current and all direct neighbour grid squares". Any > grid would do, but using one which is included in many maps helps. >=20 > Good idea??? Bad idea??? >=20 > I am looking for a java function which does just this transformation.=20 > Geotools might be a bit of an overkill!? But anyway: the=20 > TransformationConsole example seems to do exactly what I want (given I > get the parameters right), correct? My understanding is that you do your own search in yours database (i.e.=20 don't use one of DataStore provided in Geotools). In this case, the=20 referencing package in geotools may help you to performs the projections on the fly. First, I suggest that you install the EPSG database: http://www.espg.org Next, open it (assuming you have Microsoft Access), click on "Browse=20 Coordinate Reference System" and find the UTM projection you are=20 interrested in (there is many). This database contains all parameters=20 for more that 3500 coordinate reference systems. Once you have found the CRS of interest, note the EPSG code (a 4 digits=20 number). You can then use CoordinateSystemEPSGFactory in order to=20 construct automatically a full CRS from its EPSG code (this is the=20 easiest way, if you know this EPSG code). The rest is similar to=20 TransformConsole example. Martin.  This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl _______________________________________________ Geotoolsgt2users mailing list Geotoolsgt2users@... https://lists.sourceforge.net/lists/listinfo/geotoolsgt2users 
From: Rueben Schulz <r_j_schulz@ya...>  20040930 04:58:09

On Wed, 20040929 at 02:43, Martin Kindler wrote: > > Also I do need some general advice: > > Currently I am working in a project where I need a little GIS > functionality: I have to do a topological search on a data base > comprising a few hundred (maximally a few thousand) items. For each of > the items I have the geographical coordinates (dms using WGS84 (I barely > understand what this is, but OK)). I want to transform them to UTM to > get a grid where I can implement a trivial search like "give me all > objects in the current and all direct neighbour grid squares". Any grid > would do, but using one which is included in many maps helps. > > Good idea??? Bad idea??? > > I am looking for a java function which does just this transformation. > Geotools might be a bit of an overkill!? But anyway: the > TransformationConsole example seems to do exactly what I want (given I > get the parameters right), correct? > > Can anyone please give me some advice? I do not have the time to dive > deeply into cocrdinate systems and projections and all the (interesting) > stuff involved. For help with using geotools coordinate transformations services (CTS), see the coordinate transformation tutorial on http://www.geotools.org. You data is in latitude, longitude coordinates. WGS84 is a datum which describes an ellipsoid to approximate the shape of the earth and the ellipsoid's relationship to the earth (orientation). The important thing to note is that distances are hard to calculate with coordinates in degrees (1 degree of longitude is not a set distance as you move over the earth). Projections transfrom the lat., long. coorditantes (on an ellipsoid) to coordinates on a flat surface. Once they are transformed, you can easily calculate distances and bearings between coordinates. Unfortunately some property of distance, direction, shape or area is distorted by the projection. These distortions get worse as your coordinates move farther away from the central meridian or standard parallels of the projection (these are projection parameters). This is why it is important to use a projection that preserves the property that you are interested in calculating (I believe you want distance here). The transverse mercator projection preserves distance and area reasonably well (if I remember correctly). UTM is just a special case of the transverse mercator. The central meridian parameter for the transverse mercator can be any value you want, but having standard grids zones 6 degrees apart ensures that people will use the same central meridian for a given area (makes data sharing easier). This is similar to the concept of standard time zones. Geotools CTS can be used to transform your wgs84 coordinates to utm. The CTS tutorial describes two ways to do this (create a math transform object or create source (wgs84) and target (utm zone ?) coordinate system objects and have the factory create a math transform between these for you. The TransformationConsole uses the second method. The epsg database can simplify creating the coordinate system objects (as Martin mentioned in his email). How you get your data into geotools depends on its format. If it is something like a shapefile, you can use a datastore to read it. If it is just in a text file, just read coordinates in. To search for points topologically, you can just use a grid (in transverse mercator (UTM) coordinates). The grid would be a set resolution (ie 100 m) and therefore allow you to search for the points within about 150 m (current grid and neighbours). You can also start calculating distances between points to find ones that are within a certain radius. Searching like this can be slow for many points (you need to claculate O(n^2) distances), so you can use a spatial index to find near points before calculating their distance. Java Topology Suite has index classes. Note that the grid search method you suggested is also a simple index search. Hope that helps. Rueben > > Thanks in advance > > Martin Kindler > > > > >  > This SF.net email is sponsored by: IT Product Guide on ITManagersJournal > Use IT products in your business? Tell us what you think of them. Give us > Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more > http://productguide.itmanagersjournal.com/guidepromo.tmpl > _______________________________________________ > Geotoolsgt2users mailing list > Geotoolsgt2users@... > https://lists.sourceforge.net/lists/listinfo/geotoolsgt2users 
Sign up for the SourceForge newsletter:
No, thanks