Geoapplications development http://rgeo.wikience.org
Higher School of Economics, Moscow, www.cs.hse.ru
Geoapplications development http://rgeo.wikience.org Higher School - - PowerPoint PPT Presentation
Geoapplications development http://rgeo.wikience.org Higher School of Economics, Moscow, www.cs.hse.ru 2 Agenda 3 Set of core geometries http://www.geopackage.org/spec/ https://en.wikipedia.org/wiki/Well-known_text 4 ISO
Higher School of Economics, Moscow, www.cs.hse.ru
2
3
https://en.wikipedia.org/wiki/Well-known_text
4
Following on the addition of Envelope classes, there is a tiny introduction to the most basic ISO 19107 (geometry) objects. The root of all geometric objects in ISO 19107 is GM_Object. But GeoAPI uses the Geometry name instead. There are two objects representing points in ISO 19107:
geometries, it may be relatively heavy depending on the geometry library implementation.
Reference System (CRS). DirectPosition are *not* geometries in the classes hierarchy.
same API to work with one or other type. Since unions do not exist in Java, GeoAPI simulate the union effect by defining Position as a parent interface of both Point and DirectPosition. In ISO 19107, Envelope is simply defined by the DirectPosition of 2
structure, not a geometry sub-type. GeoAPI and SIS define many additional methods for envelopes, but the internal structure stay lightweight: only the corner ordinate values and the CRS.
http://mail-archives.apache.org/mod_mbox/sis-dev/201212.mbox/%3C50CF64BF.9000706@geomatys.fr%3E
The base type for all types in this package is not Geometry
5
package org.opengis.geometry.coordinate; import …; /** …skipped… */ @UML(identifier="GM_LineString", specification=ISO_19107) public interface LineString extends CurveSegment { /** * Returns a sequence of positions between which the curve is linearly interpolated. * The first position in the sequence is the {@linkplain #getStartPoint start Point} * of this {@code LineString}, and the last point in the sequence is the * {@linkplain #getEndPoint end point} of this {@code LineString}. * * @return The control points between which the curve is linearly interpolated. */ @UML(identifier="controlPoint", obligation=MANDATORY, specification=ISO_19107) PointArray getControlPoints(); /** * Decomposes a line string into an equivalent sequence of line segments. * * @return The sequence of line segments. */ @UML(identifier="asGM_LineSegment", obligation=MANDATORY, specification=ISO_19107) List<LineSegment> asLineSegments(); }
6
/* ... skipped ... */ package com.vividsolutions.jts.geom; import com.vividsolutions.jts.algorithm.CGAlgorithms; import com.vividsolutions.jts.operation.BoundaryOp; /** * Models an OGC-style <code>LineString</code>. * A LineString consists of a sequence of two or more vertices, * ... skipped … */ public class LineString extends Geometry implements Lineal { private static final long serialVersionUID = 3110669828065365560L; /** * The points of this <code>LineString</code>. */ protected CoordinateSequence points; /* ... skipped ... */ }
7
BTW, it is an example of a very good, proven software:
Downloads (This Week)
2013-05-30 For Windows just run testbuilder.bat; how to setup under MacOS: http://blog.perrygeo.net/2010/05/06/exploring-geometry/
with them
8
9
10
11
12
13
14
https://en.wikipedia.org/wiki/DE-9IM
15
16
http://www.vividsolutions.com/jts/javadoc/com/vividsolutions/jts/geom/Geometry.html
17
18
GEOMETRYCOLLECTION ( POLYGON ((25 35, 35 37, 38 31, 29 25, 25 35)), LINESTRING (39 39, 30 43, 23 44), POINT (22 40), POINT (19 37), POINT (21 34), POINT (18 32), POINT (17 34), POINT (20 40)) // next slides show how to build this visually
19
Polygon polygonB = (Polygon) reader.read("POLYGON ((20 30, 35 35, 30 20, 20 30))"); Geometry result = polygonA.difference(polygonB); // POLYGON ((35 10, 45 45, 15 40, 10 20, 35 10), (20 30, 35 35, 30 20, 20 30)) // see course site for Java code and Maven pom.xml
20
21
22
https://desktop.arcgis.com/en/desktop/latest/manage-data/using-sql-with- gdbs/spatial-operation-functions-for-st-geometry.htm
23
24
25
http://www.namekdev.net/2014/06/iterative-version-of-ramer-douglas-peucker-line-simplification-algorithm
26