Hi,
I am looking for a way to create a surface that spans over the
International Date Line. With the following code I get an error
(java.lang.IllegalArgumentException: The curve segments are not simple,
but intersect). It seems to me that the curve is interpreted to span
over the other side of the globe instead of crossing the Date Line
(hence the intersection). Is there any way around this?
GeometryBuilder gb = new
GeometryBuilder(CRS.decode("AUTO:42001,179.0,66.0"));
GeometryFactory geomF = gb.getGeometryFactory();
PositionFactory posF = gb.getPositionFactory();
PrimitiveFactory primF = gb.getPrimitiveFactory();
// create a list of connected positions
List<Position> dps = new ArrayList<Position>();
dps.add(gb.createDirectPosition( new double[] {66, 179} ));
dps.add(gb.createDirectPosition( new double[] {67, -179} ));
dps.add(gb.createDirectPosition( new double[] {67, -177} ));
dps.add(gb.createDirectPosition( new double[] {66, -179} ));
dps.add(gb.createDirectPosition( new double[] {66, 179} ));
// create linestring from directpositions
LineString line = gb.createLineString(dps);
// create curvesegments from line
ArrayList<CurveSegment> segs = new ArrayList<CurveSegment>();
segs.add(line);
// Create list of OrientableCurves that make up the surface
OrientableCurve curve = gb.createCurve(segs);
List<OrientableCurve> orientableCurves = new
ArrayList<OrientableCurve>();
orientableCurves.add(curve);
System.out.println(gb.createSurfaceBoundary(curve));
In addition can anyone point me at some sources on information about how
to work with geometries intersecting/near the International Date Line in
general. I would have thought that this is a very common and known
"special" case, however, I am not able to find much information about
how this is treated in GeoTools.
Best regards,
Dieter Steiner
--
*Dieter Steiner*
Projektmitarbeiter
Institut für Wirtschaftsinformatik - Data & Knowledge Engineering
*JOHANNES KEPLER*
*UNIVERSITÄT LINZ*
Altenberger Straße 69
Science Park III, S3 111
4040 Linz, Österreich
T +43 732 2468 4278
[email protected]
www.jku.at
------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
GeoTools-GT2-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users