Closed GoogleCodeExporter closed 9 years ago
why are you expecting 8464.19172543766 as a result?
Original comment by diegogu...@gmail.com
on 5 May 2014 at 3:44
Because I'm specifying SRID=4326 (WGS 84), the result should be the distance in
meters.
For example, this query in Oracle returns the correct value:
select sdo_geom.sdo_distance(
sdo_geometry(2001, 4326, sdo_point_type(-0.4246, 38.4099, null), null, null),
sdo_geometry(2001, 4326, sdo_point_type(-0.5199, 38.39619, null), null, null),
0.005) as dist
from dual;
> 8462,38428929519
But, if you remove the SRID:
select sdo_geom.sdo_distance(
sdo_geometry(2001, null, sdo_point_type(-0.4246, 38.4099, null), null, null),
sdo_geometry(2001, null, sdo_point_type(-0.5199, 38.39619, null), null, null),
0.005) as dist
from dual;
> 0,0962811201638207
So, it seems that it's ignoring the 'SRID=4326' part of the Well-known text (or
I am doing something wrong...)
Original comment by ava...@jsvrfid.es
on 5 May 2014 at 3:53
NTS will not perform any Great-Circle-Math. It assumes all coordinates to be in
the cartesian space.
You will have to project the geometries to a planar coordinate system and then
calculate distance or area.
Original comment by felix.ob...@netcologne.de
on 5 May 2014 at 3:56
Actually, I'm using a third-party data provider (dotConnect for Oracle) which
uses this plugin, so there's nothing I can do to change how it is used.
Is there any way to get the desired result using NTS? Maybe the type of this
issue be changed to 'Enharcement' and proposed to further release?
Thank you for the fast response
Original comment by ava...@jsvrfid.es
on 5 May 2014 at 4:29
hope this can help: http://goo.gl/dC85wJ
Original comment by diegogu...@gmail.com
on 5 May 2014 at 7:41
Original comment by diegogu...@gmail.com
on 5 May 2014 at 7:42
You are getting the wkt from an oracle database, parse that to a NTS/GeoAPI
geometry?
Not knowing oracle at all, but I would suppose that it should be able to
provide you with a reprojected geometry.
Original comment by felix.ob...@netcologne.de
on 6 May 2014 at 9:11
Original issue reported on code.google.com by
ava...@jsvrfid.es
on 5 May 2014 at 3:34