Hello,

I just started using Geotools. I have two shapefiles generated via ArcGIS.  
With GeoTools I am trying to find the areas of each along with determining if 
they intersect and if so, the area of the intersecting polygon. Below is my 
code snippet to getArea():
       File file = new File(shapefile);
FileDataStore store = null;
       try {
              store = FileDataStoreFinder.getDataStore(file);
       } catch (IOException e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
       }
SimpleFeatureSource featureSource = null;
:
       while (fShape.hasNext()) {
              SimpleFeature ft = fShape.next();
              Geometry geometry = (Geometry)ft.getDefaultGeometry();
double area= geometry.getArea();
:
           }
I get totally different numbers when I try to lookup the area in acres from 
ArcGIS. I tried printing the wkt and noticed the unit as "m" and assuming my 
answer is in square meters here...

Also, the shapefiles are generated from ArcGIS without Mercator projection 
(GCS_WGS_1984). There is an example in the userguide about doing a transform to 
reproject to a standard CRS. Because I am using the standard projection, do I 
still have to do the math transform? I am not sure what my targetCRS must be? 
Any help is greatly appreciated!!

Thanks, Suma.
------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
GeoTools-GT2-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to