Convert to JTS geometries
|Reported by:||joshdoe||Owned by:||joshdoe|
For the conflation plugin, I'd like to take advantage of all the functions provided by the Java Topology Suite (JTS) and the Java Conflation Suite (JCS). So the first thing is to convert OsmPrimitives to JTS geometries. I've got a first take, which I've attached; I would appreciate comments, especially since I think these routines could be used by other plugins. Most notably I'm not doing anything with relations yet.
Also, JTS itself doesn't care about attributes of features, just geometry, so for JCS they use some classes from JUMP. The OsmFeature is a simple subclass of the JUMP Feature class, which simply makes a copy of the geometry and attributes. This could be a lot smarter, such as updating directly from the OsmPrimitive itself, however the JUMP classes assume a fixed attribute schema, so I'm not sure how I'd handle this.