I need to load .shp files in Hive more precisely in HortonWorks sandbox through Beeswax, can anyone provide example of Hive commands or steps for Beeswax ?
[GIS] Load .shp file in Hive(Hadoop)
hadoophiveshapefile
Related Solutions
The set of files that you have is referred to collectively, as a Shapefile. It is a common spatial data format developed by ESRI that is used for data transfer between many different packages.
This format consists of 3 primary files with the same name, but the following file extensions:
- .shp
- .dbf
- .shx
A file containing Projection information:
- .prj
Plus a couple of files generated by software that are spatial indexes:
- .sbn
- .sbx
Of the first 3 files, the .shp
file contains the spatial information, namely, x,y
coordinate pairs describing the point, line or polygon features contained in the file.
The .dbf
file is a dbase format file, and contains the Attribute information, or the descriptive characteristics of the features. Some examples of this would be: "Name", if the feature is a point
representing a city; "Road Name", or "Speed", if the feature is a line
representing a street; or "Population" if the feature is a polygon
representing a county area*, or country.
The .shx
file acts as a linking file between the .shp
and .dbf
. It matches up the correct row in the .shp
file with the correct record in the .dbf
file.
Without these first 3 files, you do not have a valid shapefile.
The other files listed are optional, though the .prj
is necessary for correct positioning of your data with respect to other spatial data, and for measuring and calculating distance. See Map Projection, for more information.
The .sbx and .sbn are generally created automatically when the shapefile is created. They can, however, be deleted and recreated without invalidating the shapefile as a whole.
Generally, when you use software that is able to read this format, the files listed in the add layers window are the .shp
file. The other files are automatically loaded in. If, however, there is a problem with one of the 3 primary files, the .shp file may be loaded in, but an error will appear saying that this is not a valid shapefile, or simply no features will appear.
In the case you have shown, you appear to be missing the critical .shx
file. Without this, there is no connection between the spatial features and the attribute data, thus the software is not able to load the shapefile in properly. What you need to do is go back to the source of your data and make sure that you obtain the .shx file as well. Once you do that, you should be able to load the data in with no problems.
This answer may be overkill, but it helps to know what the files included in a shapefile are for. It may help in the future to know what to look for if you encounter a similar problem.
I'm assuming we're both talking about the SLD XML schema specified by the Open Geospatial Consortium (OGC) for describing the appearance of map layers.
I have SLD's/lyr files with my shp/gdb files. They all have the same name except for the extension. Is it possible for me to force qgis to load the sld with the shp so that I don't need to manually go to properties, load style and ok it? In arcmap I can just open the lyr instead of the .shp -is there a similar process for qgis.
Unfortunately, you still have to load SLD styles manually for version 1.8 of QGIS.
Best Answer
You should be able to export the shape file as a GeoJSON file from QGIS.
Keep in mind that while it is valid JSON, the GeoJSON output this way may not be in the exact format you are expecting. OGR (which is what QGIS is using to export the data) will put all features into a single feature collection, which may show up as a single record depending on how you are parsing it.