Hi Diethard,
From the exception, it looks like there are some polygons in
the shapefile that are outside the lat/lon bounds of [-90, 90]
and [-180, 180]. When we encounter coordinates like that we
fail the indexing as invalid.
It's also possible that there are some subtle precision errors
going on, since the coordinates are very close to 180. I'm not
sure if that would be coming from the shapefile or something
in our processing.
I think for a quick fix, in our shapefile ingestion code we
should be ingesting the features one at a time, instead of all
at once. This would allow us to skip any polygons that have
invalid coordinates, but still ingest the rest of the
shapefile:
https://github.com/locationtech/geomesa/blob/master/geomesa-utils/src/main/scala/org/locationtech/geomesa/utils/geotools/GeneralShapefileIngest.scala#L91
As an example, in our non-shapefile ingest code we ingest
features one at a time:
https://github.com/locationtech/geomesa/blob/master/geomesa-tools/src/main/scala/org/locationtech/geomesa/tools/ingest/AbstractIngest.scala#L125-L138
I don't think I have time to look into it this week, but
verifying the CRS and coordinates in the shapefile would also
be a good idea. I should have time next week if it's not
resolved by then.
Thanks,
Emilio
On 05/16/2017 06:23 PM, Diethard
Steiner wrote:
Thanks a lot Jim and Emilio for your replies!
I quickly tried without specifying the feature/schema:
geomesa ingest -u root -p password \
-c myNamespace.countries -f shapeFile
TM_WORLD_BORDERS_SIMPL-0.3.shp
And I get following error:
ERROR requirement failed: Values out of bounds ([-180.0
180.0] [-90.0 90.0]): [-180.0 180.00000190734863] [-90.0
-60.54722595214844]
java.lang.IllegalArgumentException: requirement failed:
Values out of bounds ([-180.0 180.0] [-90.0 90.0]):
[-180.0 180.00000190734863] [-90.0 -60.54722595214844]
at scala.Predef$.require(Predef.scala:219)
at
org.locationtech.geomesa.curve.XZ2SFC.org$locationtech$geomesa$curve$XZ2SFC$$normalize(XZ2SFC.scala:321)
at
org.locationtech.geomesa.curve.XZ2SFC.index(XZ2SFC.scala:55)
at
org.locationtech.geomesa.index.index.XZ2Index$$anonfun$toIndexKey$1.apply(XZ2Index.scala:124)
It's quite late over here now ... so I'll only have a
chance to check your reply tomorrow. Thanks in advance
for your help!
Best regards,
Diethard
_______________________________________________
geomesa-users mailing list
geomesa-users@xxxxxxxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.locationtech.org/mailman/listinfo/geomesa-users