Re: [Geotools-gt2-users] Using evaluate on GridCoverge2D

2011-04-01 Thread Mike O'Toole
Thank You Michael. That solved my problem perfectly. I'm now having an issue with the evaluate returning 0.0 every time. The following is a simplified version of my code. I have a latitude, longitude, and value for points that I'm creating a feature collection with. I then use the VectorToRaste

Re: [Geotools-gt2-users] Fast function to find recordCount of the Shapefile

2011-04-01 Thread Jody Garnett
Yes. Please use dataStore.getFeatureSource( typeName ).getCount( Query.ALL ); It should be able to give you an answer based on the number of records (rather than reading the contents). -- Jody Garnett On Saturday, 2 April 2011 at 12:17 AM, LSA wrote: > I use something like: > public static i

[Geotools-gt2-users] Fast function to find recordCount of the Shapefile

2011-04-01 Thread LSA
I use something like: public static int getCount(ShapefileDataStore shapefileDataStore) throws IOException{ return shapefileDataStore.getCount(new DefaultQuery(shapefileDataStore.getTypeNames()[0], Filter.INCLUDE)); } , but creating and opening ShapefileDataStore is slow. Is it possible to

[Geotools-gt2-users] FactoryFinder can't find factories in JBoss - FactorySPI broken?

2011-04-01 Thread Rodrigo Del C. Andrade
Hello folks.So, I work on a large project which is deployed in an ear to JBoss 4.3, and in which the GIS module that makes use of of GeoTools is a small but important part. In the days of yore, this project used to be built with ant, so for the GIS part I had a separate project using maven and I m

Re: [Geotools-gt2-users] Retrieving SimpleFeature's coordinates

2011-04-01 Thread Michael Bedward
No worries Ante. GeoTools provides a couple of helper classes for working with JTS that you might find, well, helpful :) http://docs.geotools.org/stable/javadocs/org/geotools/geometry/jts/Geometries.html http://docs.geotools.org/stable/javadocs/org/geotools/geometry/jts/JTS.html Michael 2011/4/

Re: [Geotools-gt2-users] Retrieving SimpleFeature's coordinates

2011-04-01 Thread ante lakos
hi, thanks for your effort Michael. Thanks to your post I've figured it out now. I had the wrong Geometry class imported: org.geotools.geometry.Geometry (which does not have getCoordinates() method) instead of: com.vividsolutions.jts.geom.Geometry (which indeed has the method) I already worked pa

Re: [Geotools-gt2-users] check if geometry is inside another

2011-04-01 Thread Andy Turner
Hi, Just to say that last I looked, intersection with JTS was using double precision floating point Java and may result in error calculating the intersection points. You may be able to force the intersection to be on one line or another, but still... If the error for you is so small that you do