koopjs / koop-provider-geojson

GeoJSON provider for Koop
Other
6 stars 5 forks source link

Multipolygon and MultiLinestring issue? #13

Closed jim2 closed 5 years ago

jim2 commented 5 years ago

Hi I am running koop-provider-geojson. I have a service that emits the attached geojson which is consumed by koop. When I view the Geoservices output from koop, it shows up as "type":"Table" and I am unable to visualize in AGOL. However, if I take the same geojson and use koop-provider-file-geojson, it works. Perhaps the multipolygon logic is missing? When I convert to regular polygon, it works.

I also saw similar behavior with MultiLinestring. When I converted to Linestring, it worked as well.

my geojson file

Geoservices output from koop-provider-geojson: "type":"Table" : {"id":0,"name":"Not Set","type":"Table","description":"Data from test","copyrightText":" ","parentLayer":null,"subLayers":null,"minScale":0,"maxScale":0,"drawingInfo":{"labelingInfo":null},"defaultVisibility":true,"extent":{"xmin":-179.14734,"ymin":-14.552549,"xmax":179.77847,"ymax":71.352561,"spatialReference":{"wkid":4326,"latestWkid":4326}},"hasAttachments":false,"htmlPopupType":"esriServerHTMLPopupTypeNone","displayField":"OBJECTID","typeIdField":null,"fields":[{"name":"OBJECTID","type":"esriFieldTypeOID","alias":"OBJECTID","sqlType":"sqlTypeOther","domain":null,"defaultValue":null,"editable":false,"nullable":false},{"name":"geoid","type":"esriFieldTypeInteger","alias":"geoid","sqlType":"sqlTypeOther","domain":null,"defaultValue":null,"editable":false,"nullable":false},{"name":"name","type":"esriFieldTypeString","alias":"name","sqlType":"sqlTypeOther","domain":null,"defaultValue":null,"length":128,"editable":false,"nullable":false}],"relationships":[],"canModifyLayer":false,"canScaleSymbols":false,"hasLabels":false,"capabilities":"Query","maxRecordCount":2000,"supportsStatistics":true,"supportsAdvancedQueries":true,"supportedQueryFormats":"JSON","ownershipBasedAccessControlForFeatures":{"allowOthersToQuery":true},"supportsCoordinatesQuantization":false,"useStandardizedQueries":true,"advancedQueryCapabilities":{"useStandardizedQueries":true,"supportsStatistics":true,"supportsOrderBy":true,"supportsDistinct":true,"supportsPagination":true,"supportsTrueCurve":false,"supportsReturningQueryExtent":true,"supportsQueryWithDistance":true},"dateFieldsTimeReference":null,"isDataVersioned":false,"supportsRollbackOnFailureParameter":true,"hasM":false,"hasZ":false,"allowGeometryUpdates":true,"objectIdField":"OBJECTID","globalIdField":"","types":[],"templates":[],"hasStaticData":false,"currentVersion":10.51,"fullVersion":"10.5.1"}

Geoservices output from koop-provider-file-geojson: "type":"Feature Layer" : {"id":0,"name":"states.geojson","type":"Feature Layer","description":"GeoJSON from states.geojson","copyrightText":" ","parentLayer":null,"subLayers":null,"minScale":0,"maxScale":0,"drawingInfo":{"renderer":{"type":"simple","symbol":{"color":[75,172,198,161],"outline":{"color":[150,150,150,155],"width":0.5,"type":"esriSLS","style":"esriSLSSolid"},"type":"esriSFS","style":"esriSFSSolid"}},"labelingInfo":null},"defaultVisibility":true,"extent":{"xmin":-179.14734,"ymin":-14.552549,"xmax":179.77847,"ymax":71.352561,"spatialReference":{"wkid":4326,"latestWkid":4326}},"hasAttachments":false,"htmlPopupType":"esriServerHTMLPopupTypeNone","displayField":"geoid","typeIdField":null,"fields":[{"name":"geoid","type":"esriFieldTypeOID","alias":"geoid","sqlType":"sqlTypeInteger","domain":null,"defaultValue":null,"editable":false,"nullable":false},{"name":"name","type":"esriFieldTypeString","alias":"name","sqlType":"sqlTypeOther","domain":null,"defaultValue":null,"length":128,"editable":false,"nullable":false}],"relationships":[],"canModifyLayer":false,"canScaleSymbols":false,"hasLabels":false,"capabilities":"Query","maxRecordCount":2000,"supportsStatistics":true,"supportsAdvancedQueries":true,"supportedQueryFormats":"JSON","ownershipBasedAccessControlForFeatures":{"allowOthersToQuery":true},"supportsCoordinatesQuantization":false,"useStandardizedQueries":true,"advancedQueryCapabilities":{"useStandardizedQueries":true,"supportsStatistics":true,"supportsOrderBy":true,"supportsDistinct":true,"supportsPagination":true,"supportsTrueCurve":false,"supportsReturningQueryExtent":true,"supportsQueryWithDistance":true},"dateFieldsTimeReference":null,"isDataVersioned":false,"supportsRollbackOnFailureParameter":true,"hasM":false,"hasZ":false,"allowGeometryUpdates":true,"objectIdField":"geoid","globalIdField":"","types":[],"templates":[],"hasStaticData":false,"timeInfo":{},"uniqueIdField":{"name":"geoid","isSystemMaintained":true},"currentVersion":10.51,"fullVersion":"10.5.1","geometryType":"esriGeometryPolygon"}

rgwozdz commented 5 years ago

Hi @jim2 - this is usually cause by geometryType being undefined or set to invalid value. See if you debug around that; I'll try to look soon.

jim2 commented 5 years ago

got it - that did the trick - many thanks!