on 02-26-2016 7:14 PM
Hi,
I've tried this in Design Studio 1.5 and Design Studio 1.6 and am left scratching my head. I've created a geojson file SERVICE_CONFLICTS.json that tests correctly at geojsonlint.com but when I add it to a shape layer, the entire map is filled in as chloropleth with the shapes I've defined excluded!
The tooltip shows on all of the map except for the shape in question:
Any ideas what might be causing the component to behave the exact opposite of what I'd expect?
Trace your polygons in the other direction. The left-hand vs right-hand rule problem is at play.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey Mike,
That worked ... any reference on what the left-hand/right-hand rule is? I could only find Fleming's law on Google. I'm generating around 650 polygons automatically with HANA spatial engine so I'm not sure how to handle this at scale. It would be nice to adjust Design Studio to handle this instead since it works on principal with geojsonlint.
I appreciate your help!
Jim
I'd ask this guy here:
Per his comment here:
Per your issue with HANA spatial generating the polys, good question. I assume you could run it thru a GeoJSON tool maybe and see if it just naturally re-orders them. But I'm not sure.
More left/right hand/foot info here:
More good info ... it begs the question why HANA spatial is generating these polygons following left-hand rule definition. I'll have to follow up and see if I can just batch process these polygons to invert their order in the short-term. The link you provided on stackexchange says that GeoJSON does not specify an order, which is probably why it works on geojsonlint.
Just to close the loop on this ... I just used Excel to invert the order of the polygons, as changing it in HANA was too intensive for me. The spatial reference guide has a section in the appendix called:
CREATE SPATIAL REFERENCE SYSTEM
That details a property called POLYGON FORMAT
Internally, SAP IQ interprets polygons by looking at the orientation of the constituent rings. As one travels a ring in the order of the defined points, the inside of the polygon is on the left side of the ring. The same rules are applied in PLANAR and ROUND EARTH spatial reference systems. The interpretation used by SAP IQ is a common but not universal interpretation. Some products use the exact opposite orientation, and some products do not rely on ring orientation to interpret polygons. The POLYGONFORMAT clause can be used to select a polygon interpretation that matches the input data, as needed. The following values are supported:
|
It seems that the EvenOdd default setting in my case is resulting in a left-hand orientation. I suspect that changing the property to Clockwise might alter the orientation, but I'm not willing to tackle creating a new spatial reference system and reloading my data.
Hi James,
I have a similar issue with my polygons, however not all of mine are "wrong". When you converted your polygons, did you find a way to "convert" them all to right-hand only if necessary, or did you just "reverse" all of them, knowing that they were left-hand?
I have about 1900 polygons, which would be time-intensive to recreate. I'm trying to find a tool that will convert them all to the correct format.
thanks,
Paul B.
Hi Paul,
In my case I had a colleague use Excel formulas to simply reverse the order of all my polygons. The same behavior occurred uniformly across 100% of the shapes, so it was easy to handle. Do you have any other feature properties associated with the shapes that you could use to filter the inverted ones out? That would make it easier to batch process.
Jim
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.