On Thu, Mar 15, 2012 at 12:47 AM, Yang <[email protected]> wrote:
> actually I just looked at the  ogrinfo -al   output of the shape file,
> it seems that because when I generated the file, I called
>
>
>         SimpleFeatureTypeBuilder builder = new SimpleFeatureTypeBuilder();
>         builder.setCRS(DefaultGeographicCRS.WGS84); // <- Coordinate
> reference system
>
> the shape file is marked as in the WGS84 coordinate system:
>
> ogrinfo -al /tmp/ttt.shp
> INFO: Open of `/tmp/ttt.shp'
>       using driver `ESRI Shapefile' successful.
>
> Layer name: ttt
> Geometry: Point
> Feature Count: 2
> Extent: (0.000000, 0.000000) - (100.000000, 0.000000)
> Layer SRS WKT:
> GEOGCS["WGS84(DD)",
>     DATUM["WGS84",
>         SPHEROID["WGS84",6378137.0,298.257223563]],
>     PRIMEM["Greenwich",0.0],
>     UNIT["degree",0.017453292519943295],
>     AXIS["Geodetic longitude",EAST],
>     AXIS["Geodetic latitude",NORTH]]
> gml_id: String (254.0)
> OGRFeature(ttt):0
>   gml_id (String) = 12345
>   POINT (0 0)
>
> OGRFeature(ttt):1
>   gml_id (String) = 2222
>   POINT (100 0)
>
>
>
>
>
> so the WGS84 is marking is simply ignored when dwithin() is run, and it
> simply assumes a flat coordinate system?

Yes, all distance based filters work in a flat coordinate system, changing
that so that they work fine over the ellipsoid is no small task.

Cheers
Andrea


-- 
-------------------------------------------------------
Ing. Andrea Aime
GeoSolutions S.A.S.
Tech lead

Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy

phone: +39 0584 962313
fax:      +39 0584 962313
mob:    +39 339 8844549

http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.youtube.com/user/GeoSolutionsIT
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf

-------------------------------------------------------

------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
GeoTools-GT2-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to