vdubya / BIMJSON

BIMJSON is a format for encoding Minimal Viable BIMs (MVB) for exchange through RESTFul web services.
http://bim-cloud.com
GNU General Public License v3.0
21 stars 3 forks source link

Polygon should follow GeoJSON polygon linear ring #18

Closed vdubya closed 8 years ago

vdubya commented 8 years ago

GeoJSON already has the concept of a polygon with holes as exterior/interior rings. Recommend revising ComplexPolygon and Geometry objects to match.

https://tools.ietf.org/html/draft-butler-geojson-06#section-2.1.6

thomas-dalbert commented 8 years ago

I know that GeoJSON has a concept of exterior and interior rings. If you take a look at the floors.json example, the first geometry uses the GeoJSON way of creating a hole: the coordinates of the outer ring are contained in the first array object (the outer ring) with the second array object being the hole or inner ring. The problem happens when you add arcs to either the inner or outer rings (or both). You can't use the construct of an array of outer rings and inner rings anymore since you can't assign those arcs to the correct ring. I believe the arcs need to follow the rings directly. I'm open to suggestions but I don't see another solution right now. But in any case, our intention to create a bridge between the BIMJSON and GeoJSON is to be able to return two versions of BIMJSON responses: One that uses WGS84 coordinates for all geometries and segmented arcs. This "GeoJSON" response would not contain any geometries of type "ComplexPolygon" since it can describe everything with straight lines. The second type of response would be used for BIM applications and would include arcs and therefore ComplexPolygon (and possibly at some point even splines, etc.) and also would use an orthogonal local coordinate system with the building geometry point as it's origin. I'm not quite sure how the schema would describe this "bilingual" nature of BIMJSON responses but I think we should be able to come up with something if we all agree that the concept makes sense.

thomas-dalbert commented 8 years ago

Regarding making BIMJSON an extension of GeoJSON, there are also options to create transformers similar to the following that an parse WKT and ArcGIS geometries: https://github.com/Esri/Terraformer

thomas-dalbert commented 8 years ago

It would be interesting to have someone in our group that has a better knowledge of working with GeoJSON and the application that support it (Leaflet, the Github rendering engine for GeoJSON, MapServer, GDAL, Google Maps API, etc.). I'm curious how far we can "extend" GeoJSON and still make it directly usable in other application. I have MapServer QGIS, and Safe FME running and can try it out myself but it would be good to have someone with deeper knowledge and some time to test. We could create a temporary exporter or web service for a couple of projects from ONUMA with the two flavors - the BIM and the GIS version - for testing purposes. But it would be good to discuss what we have to look out for before we do the development.

thomas-dalbert commented 8 years ago

@board - I didn't realize that one has to trigger notifications like this (newbie with this...). I added multiple comments to this thread

vdubya commented 8 years ago

@thomasdalbert1 All very good points, I will research further. In briefly looking at TopoJSON for lessons learned on extending GeoJSON, it appears they deliver converters for TopoJSON to/from GeoJSON.

https://github.com/mbostock/topojson/wiki/API-Reference