Error while loading Earth Engine data Error: Invalid GeoJSON geometry: {"type":"Polygon","coordinates"

Hi,

I am having errors importing population data using Earth engine in 2.39. I have an attribute to store geometries against OUs. I downloaded data from GRID3, validated it using https://geojsonlint.com and imported to dhis2 successfully.

However, when I try to import data using earth engine against the GRID3 geometry, I get this error message below. Any help with how to fix this would be highly appreciated.

Error while loading Earth Engine data Error: Invalid GeoJSON geometry: {“type”:“Polygon”,“coordinates”:[[[20.469489853,-5.68388062299994,0],[20.4531191610001,-5.68102526999996,0],[20.4272306250001,-5.67721813199995,0],[20.4096773520001,-5.66949939299997,0],[20.4059106550001,-5.66784305599998,0],[20.403542138,-5.66652894299995,0],[20.4003298660001,-5.66260283199995,0],[20.3933104560001,-5.65760596399997,0],[20.388194615,-5.65249012299995,0],[20.383792612,-5.64785017399993,0],[20.379866501,-5.64332919799995,0],[20.375345526,-5.63821335699993,0],[20.3696348190001,-5.63404929999996,0],[20.3651138430001,-5.63202675899993,0],[20.3620825880001,-5.63202675899993,0],[20.3608308130001,-5.63202675899993,0],[20.3573805950001,-5.62940935099994,0],[20.3523837270001,-5.63095600099996,0],[20.3458402090001,-5.62738680899997,0],[20.340367449,-5.62262788699996,0],[20.3381069600001,-5.61727409999997,0],[20.3376310690001,-5.61156339299993,0],[20.3340618770001,-5.60704241799994,0],[20.3287080900001,-5.60478192999994,0],[20.32323533,-5.60466295599997,0],[20.3188333260001,-5.60192657699997,0],[20.3160969460001,-5.60192657699997,0],[20.30883959,-5.59704868199998,0],[20.306222184,-5.59312257099998,0],[20.303604776,-5.58931543299997,0],[20.303247857,-5.58634110699995,0],[20.3021770990001,-5.58491343099996,0],[20.298369962,-5.58503240399995,0],[20.294562824,-5.58491343099996,0],[20.2889710910001,-5.58550829599994,0],[20.2873352120001,-5.58538932299996,0],[20.283171155,-5.58880979799994,0],[20.2751099660001,-5.59156350399996,0],[20.275074223,-5.59167975099996,0],[20.2749271370001,-5.59215786399994,0],[20.274356137,-5.59330011399993,0],[20.2742133950001,-5.59408520199997,0],[20.274213387,-5.59408523899998,0],[20.273142637,-5.59487061399994,0],[20.272887912,-5.59501205399994,0],[20.272570387,-5.59518836399997,0],[20.271500799,-5.59572709699995,0],[20.2715007510001,-5.59572711399994,0],[20.270715507,-5.59572710699996,0],[20.269716137,-5.59594123899996,0],[20.2689310120001,-5.59658373899993,0],[20.268637733,-5.59687701799993,0],[20.2683598950001,-5.59715489999996,0],[20.2684643910001,-5.59825236299997,0],[20.268464395,-5.59825239999998,0],[20.268508624,-5.59878886599995,0],[20.2685740050001,-5.59958186999995,0],[20.2682812780001,-5.59983806999998,0],[20.2680030070001,-5.60008160799993,0],[20.267431887,-5.60122360399993,0],[20.2661468850001,-5.60115223999998,0],[20.265850727,-5.60132497299998,0],[20.2652903000001,-5.60165189999998,0],[20.2650080550001,-5.60213578799994,0],[20.264790637,-5.60250861399993,0],[20.2645765120001,-5.60336523899997,0],[20.264005508,-5.60407899199993,0],[20.2635058000001,-5.60529259999993,0],[20.2625885080001,-5.60670399299994,0],[20.2620066330001,-5.60757686099993,0],[20.262006603,-5.60757690299994,0],[20.2619159220001,-5.60769781799996,0],[20.2613643,-5.60843339999997,0],[20.260682882,-5.60892008799993,0],[20.2603649050001,-5.60914721499995,0],[20.2607218000001,-5.61021809999994,0],[20.2602935150001,-5.61093186699998,0],[20.259793884,-5.61114609799995,0],[20.2590799000001,-5.61100319999997,0],[20.258800847,-5.61060463999996,0],[20.2585802,-5.61028949999996,0],[20.2575094000001,-5.61021799499997,0],[20.257509366,-5.61021799399992,0],[20.256795637,-5.61021799399992,0],[20.2567956,-5.61021799899993,0],[20.2557248850001,-5.61050360799993,0],[20.2550824030001,-5.61000389599997,0],[20.254511392,-5.61071760799996,0],[20.253654887,-5.61128873999996,0],[20.252155762,-5.61221673899996,0],[20.251299008,-5.61307349399993,0],[20.250585299,-5.61371570599994,0],[20.250406436,-5.61413310399996,0],[20.2501570150001,-5.61471523899996,0],[20.250175174,-5.61475675199995,0],[20.2502078050001,-5.61483134899993,0],[20.250611774,-5.61575480799996,0],[20.2506566370001,-5.61585736499995,0],[20.250799505,-5.61764199399994,0],[20.2501570150001,-5.61864136699995,0],[20.2501569950001,-5.61864139399995,0],[20.2498642150001,-5.61896338599996,0],[20.249443102,-5.61942650199995,0],[20.2481583000001,-5.61999759899993,0],[20.2481582610001,-5.61999761099997,0],[20.2472303000001,-5.62021189999996,0],[20.2448031000001,-5.62021189999996,0],[20.2438752,-5.620069,0],[20.2431614000001,-5.61985489999995,0],[20.2428758,-5.62035449999996,0],[20.2430900050001,-5.62092560799994,0],[20.243018637,-5.62221048999993,0],[20.2427889210001,-5.62253207499998,0],[20.2423047620001,-5.62320986499998,0],[20.24194264,-5.62393402899994,0],[20.2417336230001,-5.62435198599997,0],[20.241416277,-5.62420554599993,0],[20.2408056,-5.62392369999998,0],[20.2399489950001,-5.62349549499993,0],[20.2393779970001,-5.62306710599995,0],[20.238378637,-5.62306711499997,0],[20.2380348620001,-5.62331260799994,0],[20.2378788940001,-5.62342399599993,0],[20.238235891,-5.62428060599996,0],[20.2373793,-5.62442339999996,0],[20.2358803000001,-5.62492309999993,0],[20.2338101300001,-5.62492311199998,0],[20.239502993,-5.63090797999996,0],[20.24752834,-5.63698454099995,0],[20.2521438800001,-5.64161555399994,0],[20.2524339980001,-5.64259873499998,0],[20.2543329710001,-5.64903414299994,0],[20.2548207730001,-5.65068724999998,0],[20.2585386810001,-5.65737948399993,0],[20.2644225130001,-5.66399142299997,0],[20.2726667310001,-5.67879463299994,0],[20.275145277,-5.68104785599996,0],[20.279210248,-5.68474328499997,0],[20.2855234210001,-5.68864597299995,0],[20.2889984710001,-5.69320288799997,0],[20.2953932720001,-5.69379775299996,0],[20.304018818,-5.69573106499996,0],[20.3092238890001,-5.70272073199993,0],[20.3148751090001,-5.71402317199994,0],[20.319931464,-5.71521290199996,0],[20.332869783,-5.71402317199994,0],[20.341941478,-5.71372573899993,0],[20.3481875630001,-5.71774107899995,0],[20.348558037,-5.71801563999998,0],[20.350659514,-5.72255292099993,0],[20.3551329000001,-5.73073826699994,0],[20.3566785470001,-5.73187542099993,0],[20.359574561,-5.73400605899997,0],[20.370933155,-5.73246217299993,0],[20.3748923410001,-5.73192403199994,0],[20.37506734,-5.73187542099993,0],[20.385599916,-5.72894970499993,0],[20.3939280290001,-5.72627281199993,0],[20.400025398,-5.72374463399996,0],[20.416286971,-5.73187542099993,0],[20.4199533840001,-5.73370862699994,0],[20.4383055010001,-5.73852484699995,0],[20.4493111740001,-5.74018323499996,0],[20.4610706600001,-5.74259543799997,0],[20.468156505,-5.74741984199994,0],[20.4761469260001,-5.74651526699995,0],[20.4877556500001,-5.75164119699997,0],[20.4879782420001,-5.75181927099993,0],[20.4896901440001,-5.74872760999995,0],[20.4931998490001,-5.74557482499995,0],[20.498672608,-5.74414714799997,0],[20.501825395,-5.74381997199993,0],[20.5028060990001,-5.74350268499995,0],[20.4999469530001,-5.73870340499997,0],[20.488906254,-5.71738343399994,0],[20.4882593900001,-5.71656407299997,0],[20.4803401950001,-5.70653309199997,0],[20.478718529,-5.70403572699996,0],[20.4762978680001,-5.70030790899995,0],[20.47082235,-5.69187561199993,0],[20.469489853,-5.68388062299994,0]]]}
at new ee.Geometry (static/js/3469.3843380f.chunk.js:1:839562)
at new ee.Feature (static/js/3469.3843380f.chunk.js:1:857837)
at static/js/3469.3843380f.chunk.js:1:871237
at Array.map ()
at module$contents$goog$array_map (static/js/3469.3843380f.chunk.js:1:49878)
at ee.FeatureCollection [as constructor] (static/js/3469.3843380f.chunk.js:1:871184)
at new o (static/js/3469.3843380f.chunk.js:1:827854)
at ee.ComputedObject.construct (static/js/3469.3843380f.chunk.js:1:827899)
at ee.FeatureCollection (static/js/3469.3843380f.chunk.js:1:870626)
at j.getFeatureCollection (static/js/3469.3843380f.chunk.js:1:1018907)

Hi, I need to have some more information to be able to identify the error. If it’s possible to get access to your DHIS2 instance, please email the details to bjorn@dhis2.org

1 Like

HI,

Thanks for your feedback. For more context, I did download files for :
DRC Health zone and area boundaries from data.grid3.org. I cleaned up to have only Kasai province in my files.

Unfortunately, I am unable to upload the geo.json files here it is not loading

1 Like

@Bjorn_Sandvik would a database be useful for you? Currently there is only metadata, mostly just OUs and Geometry. cc: @Tobo

1 Like

Access to the DHIS2 instance would be preferable.

1 Like

Okay - I’ll have to setup a replica for you to use. I’ll follow up via email in the next day or so. Thank you!

1 Like

@Bjorn_Sandvik I have followed up with you via our ticketing system/email. You should also have received an additional email to confirm your account and set a password on that instance. We can continue the conversation there. If there is a resolution I will post it in this thread for others to see in the future.

2 Likes

@Bjorn_Sandvik

Thanks for helping out with this issue. Indeed the geojson file had 3 coordinates x,y and z where the z coordinate represents elevation. The elevation is represented as 0,0 within the payload. When importing data using earth engine, it kept failing beacuse data cannot be stored against elevation so the need to remove the z coordinates from the geojson payload solved the problem. e.g [20.469489853,-5.68388062299994,0,0] was adjusted to [20.469489853,-5.68388062299994].

Thanks for being very helpful

1 Like