Tag Info

Hot answers tagged

5

To read your shapefile, i recommend you to use rgdal package and its readOGR function, or eventually use readShapeLines from maptools package. These packages rely on the sp package as concerning how the geospatial data is structured in R. You can do easily this to convert your shapefile into data.frame (ie extract the attributes of the shapefile) ...


4

Try add Long, Lat columns after Name column in attribute table and calculate values via field calculator. When you save to CSV in save Options select GEOMETRY=Defaults (defoults this options set AS_XY) and you receive CSV file with only columns in attribute table of shapefile.


3

Look at the samples on the specification site. You'll need to write a script in the language of your choice that will get you from [ {"date":"2014-09-25","time":"20:49:09","lat":"53.269","lon":"6.935","depth":"3.0","place":"Meedhuizen","mag":"1.5","type":"GH","last":"True"}, ...


3

Thanks to your good description I guessed that the projection that Hummingbird is using is "WGS 84 / World Mercator" which has EPSG-code EPSG:3395. More information about this projection: http://spatialreference.org/ref/epsg/3395/ http://epsg.io/3395 ...


2

No need for a third party tool. Change the extension to .zip, open and extract the file you want.


2

# import libraries import arcpy, os # path to file polyFC = r'C:\junk\raa\RAA_20140522.shp' # field name to use for file names fieldName = "FID" # set overwrite environment arcpy.env.overwriteOutput = True # loop through features for row in arcpy.da.SearchCursor(polyFC, ["SHAPE@", fieldName]): # make new filename based on field value newName = ...


2

If you don't know the extent in coordinates of the prj file, you have to georeference the file manually using ground control points. This is rather comfortable if you have QGIS installed, and you can guess some details from the image. In some cases, you can build the extent manually if the filename follows a certain rule, like the one-degree-SRTM files do. ...


2

ArcGIS solutions: Convert the x,y,z data to a feature class then: Build a TIN using x,y,z data and then convert this to a raster. Interpolate the x,y,z to raster. Use Anudem (topo2raster) to create a DEM. Convert point to raster and just set a cell size that is suitable for your x,y,z data (usually only for dense data). I would output a GeoTiff. x,y,z ...


1

Then I put every record in the rows of a pandas.DataFrame Why ? If you only want to copy the original attributes (LineString) to the new shapefile (Points), after computing the centroid, you don't need Pandas: import fiona from shapely.geometry import shape, mapping with fiona.open("polyline.shp") as input: # change only the geometry of the ...


1

MapInfo supports GeoTiff, just use File > Open and change the 'Files of Type' dropdown to 'Raster Images'. This should generate a tab file for your GeoTiff.


1

Please read the sp vignette on spatial classes and methods. vignette(package="sp")[4] vignette("intro_sp") Since there is a slot (@data) that holds a data.frame related to the sp object, no coercion is required. class(foo@data) str(foo@data) ( df <- foo@data ) However, it is good practice to operate directly on the @data slot rather than pulling ...


1

Did you tried the mmqgis plugin? http://plugins.qgis.org/plugins/mmqgis/


1

I would suggest using arcpy. Here is the general proposed code flow: Make feature layer of layer of interest Use search cursor on feature layer to get attribute of ID field and attribute of field for new shp name Use select by attribute method for each ID attribute for each row (i.e. unique feature) Create new feature class on selected feature layer using ...



Only top voted, non community-wiki answers of a minimum length are eligible