Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [geomesa-users] Ingesting a shapefile with a reserved word (ID) field

So I partially solved the problem with the ID column myself.   I downloaded GDAL and used ogrinfo with the SQL option to drop the column.

I am using Geomesa 1.3.1.

Now I can't import the shape file. I am getting the following stack trace.  I get the same stacktrace after importing the shapefile into geoserver
and using it to export a shape file.  Thoughts.

[root@bdpgeoserver geomesa-accumulo_2.11-1.3.1]# bin/geomesa ingest -u root -p cloudbase123 --zookeepers bdpnode4:2181 --instance rdk -c Korea_Data -f buildings1 /data/NKLayers/bp/building_polygon_polygon.shp ERROR Invalid spec string at index 74. Expected one of: attribute type binding, geometry type binding. java.lang.IllegalArgumentException: Invalid spec string at index 74. Expected one of: attribute type binding, geometry type binding.     at org.locationtech.geomesa.utils.geotools.SimpleFeatureTypes$.createType(SimpleFeatureTypes.scala:96)     at org.locationtech.geomesa.utils.geotools.SimpleFeatureTypes$.createType(SimpleFeatureTypes.scala:83)     at org.locationtech.geomesa.index.geotools.GeoMesaDataStore$$anonfun$1.apply(GeoMesaDataStore.scala:174)     at org.locationtech.geomesa.index.geotools.GeoMesaDataStore$$anonfun$1.apply(GeoMesaDataStore.scala:174)
    at scala.Option.map(Option.scala:146)
    at org.locationtech.geomesa.index.geotools.GeoMesaDataStore.getSchema(GeoMesaDataStore.scala:174)     at org.locationtech.geomesa.accumulo.data.AccumuloDataStore.getSchema(AccumuloDataStore.scala:144)     at org.locationtech.geomesa.index.geotools.GeoMesaDataStore.createSchema(GeoMesaDataStore.scala:134)     at org.locationtech.geomesa.accumulo.data.AccumuloDataStore.createSchema(AccumuloDataStore.scala:128)     at org.locationtech.geomesa.accumulo.data.AccumuloDataStore.createSchema(AccumuloDataStore.scala:48)     at org.locationtech.geomesa.utils.geotools.GeneralShapefileIngest$.featuresToDataStore(GeneralShapefileIngest.scala:79)     at org.locationtech.geomesa.utils.geotools.GeneralShapefileIngest$.shpToDataStore(GeneralShapefileIngest.scala:49)     at org.locationtech.geomesa.tools.ingest.IngestCommand$$anonfun$execute$2$$anonfun$apply$2.apply(IngestCommand.scala:51)     at org.locationtech.geomesa.tools.ingest.IngestCommand$$anonfun$execute$2$$anonfun$apply$2.apply(IngestCommand.scala:51)
    at scala.collection.Iterator$class.foreach(Iterator.scala:742)
    at scala.collection.AbstractIterator.foreach(Iterator.scala:1194)
    at scala.collection.IterableLike$class.foreach(IterableLike.scala:72)
    at scala.collection.AbstractIterable.foreach(Iterable.scala:54)
    at org.locationtech.geomesa.tools.ingest.IngestCommand$$anonfun$execute$2.apply(IngestCommand.scala:51)     at org.locationtech.geomesa.tools.ingest.IngestCommand$$anonfun$execute$2.apply(IngestCommand.scala:45)     at org.locationtech.geomesa.tools.DataStoreCommand$class.withDataStore(Command.scala:59)     at org.locationtech.geomesa.accumulo.tools.ingest.AccumuloIngestCommand.withDataStore(AccumuloIngestCommand.scala:20)     at org.locationtech.geomesa.tools.ingest.IngestCommand$class.execute(IngestCommand.scala:45)     at org.locationtech.geomesa.accumulo.tools.ingest.AccumuloIngestCommand.execute(AccumuloIngestCommand.scala:20)
    at org.locationtech.geomesa.tools.Runner$class.main(Runner.scala:28)
    at org.locationtech.geomesa.accumulo.tools.AccumuloRunner$.main(AccumuloRunner.scala:28)     at org.locationtech.geomesa.accumulo.tools.AccumuloRunner.main(AccumuloRunner.scala) Caused by: org.parboiled.errors.ParsingException: Invalid spec string at index 74. Expected one of: attribute type binding, geometry type binding.     at org.locationtech.geomesa.utils.geotools.SimpleFeatureSpecParser$$anonfun$parse$1.apply(SimpleFeatureSpecParser.scala:39)     at org.locationtech.geomesa.utils.geotools.SimpleFeatureSpecParser$$anonfun$parse$1.apply(SimpleFeatureSpecParser.scala:39)
    at scala.Option.getOrElse(Option.scala:121)
    at org.locationtech.geomesa.utils.geotools.SimpleFeatureSpecParser$.parse(SimpleFeatureSpecParser.scala:39)     at org.locationtech.geomesa.utils.geotools.SimpleFeatureSpecParser$.parse(SimpleFeatureSpecParser.scala:28)
    ... 27 more


On 10/24/17 6:42 PM, David Boyd wrote:
[This sender failed our fraud detection checks and may not be who they appear to be. Learn about spoofing at http://aka.ms/LearnAboutSpoofing]

I have a bunch of shapefiles that all have a field with the name
ID.    I get the standard message from the command line tool:

[root@bdpgeoserver geomesa-accumulo_2.11-1.3.1]# bin/geomesa ingest -u
root -p xxxxxx --zookeepers bdpnode4:2181 --instance rdk -c Korea_Data
-f buildings /data/NKLayers/osmdata/data/building_polygon_1_polygon.shp
ERROR The simple feature type contains attribute name(s) that are
reserved words: ID. You may override this check by setting
'override.reserved.words=true' in the simple feature type user data,
but it may cause errors with some functionality.
But I am not finding out how to set the override check.
I can convert everything to an editable format then delete the field
manually but
that will take a lot of time.

Can I pre-create the featuretype without the field then ingest?

--
========= mailto:dboyd@xxxxxxxxxxxxxxxxx ============
David W. Boyd
VP,  Data Solutions
10432 Balls Ford, Suite 240
Manassas, VA 20109
office:   +1-703-552-2862
cell:     +1-703-402-7908
============== http://www.incadencecorp.com/ ============
ISO/IEC JTC1 WG9, editor ISO/IEC 20547 Big Data Reference Architecture
Chair ANSI/INCITS TC Big Data
Co-chair NIST Big Data Public Working Group Reference Architecture
First Robotic Mentor - FRC, FTC - www.iliterobotics.org
Board Member- USSTEM Foundation - www.usstem.org

The information contained in this message may be privileged
and/or confidential and protected from disclosure.
If the reader of this message is not the intended recipient
or an employee or agent responsible for delivering this message
to the intended recipient, you are hereby notified that any
dissemination, distribution or copying of this communication
is strictly prohibited.  If you have received this communication
in error, please notify the sender immediately by replying to
this message and deleting the material from any computer.



_______________________________________________
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

--
========= mailto:dboyd@xxxxxxxxxxxxxxxxx ============
David W. Boyd
VP,  Data Solutions
10432 Balls Ford, Suite 240
Manassas, VA 20109
office:   +1-703-552-2862
cell:     +1-703-402-7908
============== http://www.incadencecorp.com/ ============
ISO/IEC JTC1 WG9, editor ISO/IEC 20547 Big Data Reference Architecture
Chair ANSI/INCITS TC Big Data
Co-chair NIST Big Data Public Working Group Reference Architecture
First Robotic Mentor - FRC, FTC - www.iliterobotics.org
Board Member- USSTEM Foundation - www.usstem.org

The information contained in this message may be privileged
and/or confidential and protected from disclosure.
If the reader of this message is not the intended recipient
or an employee or agent responsible for delivering this message
to the intended recipient, you are hereby notified that any
dissemination, distribution or copying of this communication
is strictly prohibited.  If you have received this communication
in error, please notify the sender immediately by replying to
this message and deleting the material from any computer.



Back to the top