Esri / gis-tools-for-hadoop

The GIS Tools for Hadoop are a collection of GIS tools for spatial analysis of big data.
http://esri.github.io/gis-tools-for-hadoop/
Apache License 2.0
521 stars 254 forks source link

Creating Counties Table #42

Closed mkeller3 closed 8 years ago

mkeller3 commented 8 years ago

Hello,

When creating the table for the California counties:

CREATE TABLE counties (Area string, Perimeter string, State string, County string, Name string, BoundaryShape binary)
ROW FORMAT SERDE 'com.esri.hadoop.hive.serde.JsonSerde'
STORED AS INPUTFORMAT 'com.esri.json.hadoop.EnclosedJsonInputFormat' OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat';

It notes that a column is called BoundaryShape, but when i convert the json file to a feature class it does not have the column so I am trying to figure out where it gets this information from to find the boundaries for each of the polygons.

I am trying to do a similar project with the US States and am trying to figure out what would be the equivalent to the BoundaryShape field.

randallwhitman commented 8 years ago

By "when i convert the json file to a feature class",

mkeller3 commented 8 years ago

Import it to ArcGIS Desktop with the JSON To Features tool

randallwhitman commented 8 years ago

ArcGIS Desktop likely calls it "SHAPE" rather than "BoundaryShape".

mkeller3 commented 8 years ago

If ArcGIS Desktop likely calls it "SHAPE" rather than "BoundaryShape" then for my other file where "Area" is called "Shape_Area" in ArcGIS Desktop would I put "BoundaryShapeArea" inside the create table function for hadoop?

randallwhitman commented 8 years ago

ArcGIS desktop automatically generates "Shape_Area" for polygon feature classes.

mkeller3 commented 8 years ago

So for any json file when creating the table it should be labeled BoundaryShape not Shape_Area?

randallwhitman commented 8 years ago

That should work OK.