Skip to content

Instantly share code, notes, and snippets.

@vpipkt
Created January 27, 2016 21:38
Show Gist options
  • Save vpipkt/5333fa70869549f66715 to your computer and use it in GitHub Desktop.
Save vpipkt/5333fa70869549f66715 to your computer and use it in GitHub Desktop.
geomesa ingest of well known text polygon
cat <<EOF >>poly.txt
1 POLYGON((100 0, 101 0, 101 1, 100 1, 100 0))
2 POLYGON((-78.52 38.00, -78.44 38.00, -78.44 38.07, -78.52 38.07, -78.52 38.00))
EOF
cat <<EOF >>poly.conf
{
sft = {
type-name = "bbox"
attributes = [
{ name = "id", type = "Integer" },
{ name = "geom", type = "Polygon", srid = 4326 }
]
},
converter = {
type = "delimited-test",
format = "TSV",
id-field = "$id",
fields = [
{ name = "id", transform = "$1::string" }
{ name = "geom", tranform = "polygon($2)" }
]
}
}
EOF
#note use of accumulo 1.6 namespace 'local'
geomesa ingest -i cl -z localhost:2181 -u root -c local.small -s poly.conf -C poly.conf poly.txt
# Creating schema bbox
# Running ingestion in local mode
# Ingesting 1 file with 1 thread
# Fatal error running local ingest worker on file check.txt
# java.lang.IllegalArgumentException: Cannot find factory for bbox
# at org.locationtech.geomesa.convert.SimpleFeatureConverters$$anonfun$build$3.apply(SimpleFeatureConverterFactory.scala:93)
# at org.locationtech.geomesa.convert.SimpleFeatureConverters$$anonfun$build$3.apply(SimpleFeatureConverterFactory.scala:93)
# at scala.Option.getOrElse(Option.scala:121)
# at org.locationtech.geomesa.convert.SimpleFeatureConverters$.build(SimpleFeatureConverterFactory.scala:93)
# at org.locationtech.geomesa.tools.ingest.ConverterIngest$LocalIngestWorker$1.run(ConverterIngest.scala:87)
# at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
# at java.util.concurrent.FutureTask.run(FutureTask.java:262)
# at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
# at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
# at java.lang.Thread.run(Thread.java:745)
# [ ] 0% complete 0 ingested 0 failed in 00:00:01
# Local ingestion complete in 00:00:01
# Ingested 0 features with no failures.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment