Open brentfraser opened 3 years ago
Can you get me some more details here? I've tried corrupting a few files in order try to recreate. I tried:
null
property value, that seems to just render as the string "null".false
property value, again, just seems to render the string "false"When I eliminate all properties, the feature does not render at all, which is maybe expected?
Hmm, yes I should have supplied more details. So here's what i did today:
Looking at the census_cities.geojson in a text editor , all the properties for Farmington look ok (and no nulls), so I'm not sure why it fails.
Looks like it is bad (?) geometry for the holes in the Farminton polygon. Looking at the ogr2ogr command I used (https://github.com/geomoose/gm3-demo-data/tree/main/demo/census), I may need to specify -nlt MULTIPOLYGON
Digging in a little, I'm seeing the queryVectorLayer
function return no features from OpenLayer's forEachFeatureAtCoordinateDirect
call. Since other features work, I don't believe there to be a mismatched projection issue, and could be due to the malformed Geometry. But it's a bug in OpenLayers that we would need to investigate (locally I have version 6.9.0 installed).
In the mean time, I'm OK with just saying to users "make sure your geometry is valid"
and I thought I had filed an Issue on "Can't do identify on point or line in Drawing and Markup". Maybe it's buried in another Issue...
It looks as if we drop the -nlt Polygon
from the creation script, all is well.
Should we create a separate MR to fix our data? I suspect that this is garbage-in-is-garbage-out and there won't be much of a way for us to assist the user in that case.
Yes, I need to fix it and do a PR.
Looking at the history of the files in gm3-demo-data, i had originally used MULTIPOLYGON, but after loading the data into GeoServer inserts were a problem.
:thinking: That's interesting. I would think it would have an issue with mixed types (say Polygons and MultiePolygons) but usually a single time doesn't phase it.
It could have been GM was telling it to insert a POLYGON and GeoServer expected MULTIPOLYGON only? Maybe there is a "promote geometry" switch in GeoServer...
At least I think that is the problem. To test use geojson files in https://github.com/geomoose/gm3-demo-data/pull/8