Tag Info

Hot answers tagged

6

I just checked my old National Atlas bookmark and was redirected not to the National Map Viewer, but to the National Map's Small Scale data page. There are 197 datasets available for download there, to my eyes it looks like it's the same data that was available at the old National Atlas page and they just moved it to the new URL. Are you not being forwarded ...


6

The quickest way that I am aware of, is to use the Shapely library (requires the GEOS Engine, you can find a one-click installer for shapely here if you're on windows) The manual provides a dead-on example of what your question: >>> from shapely.geometry import Point >>> a = Point(1, 1).buffer(1.5) >>> b = Point(2, ...


5

It's probably easiest for you to create your own hexagonal grid shapefile. Many GIS have built-in tools for creating hexagonal grids of any desired resolution and orientation. For example, in the cross-platform and open-source GIS Whitebox GAT, for which I am a developer, you can use the Create Hexagonal Vector Grid tool to create a hex-grid shapefile for ...


5

You can take the layer you created for the first client, save it as a different-named shapefile, and then delete all the features in it.


5

You can create a shapefile layer with your generic list of attribute fields and simply duplicate this layer within QGIS and Save as... another shapefile (or copy/paste the physical files such as .shp, .dbf etc). Then also save a generic style file and use these when dealing with clients. So basically, you have a shapefile "template" to work with.


4

You can do it with ogr2ogr at the command line too by using the -where flag. ogr2ogr -f "ESRI Shapefile" -where "FID < 0" output_template.shp input.shp What this does is execute a SQL where query and selects those features with a FID less than 0. None should exist because FID's usually don't have a negative or below zero value, so no new features are ...


4

Based on the conversation on the comments, ArcGIS online is making a guess at the coordinate system, while ArcMap is not. When it encounters an unknown coordinate system, ArcGIS Online appears to automatically assume WGS 1984. ArcGIS for Desktop treats undefined coordinate systems differently and does not make assumptions about the data's actual coordinate ...


3

pseudocode for your problem would be: for point1 in csv: for point2 in csv: distance = haversine(point1, point2) where haversine is defined as (from e.g. http://gis.stackexchange.com/a/56589/15183) : def haversine(lon1, lat1, lon2, lat2): """ Calculate the great circle distance between two points on the earth (specified in decimal ...


3

Two other US government sites I use that provide similar (and in some cases duplicate I believe) datasets as those found on the National Atlas are: USGS Earth Explorer: http://earthexplorer.usgs.gov/ USDA Geospatial Data Gateway: http://datagateway.nrcs.usda.gov/


3

May I suggest the Census Bureau as one of the options? You can access ftp sites of the available shapefiles in any of three ftp sites: ftp://ftp.census.gov/geo/ http://www2.census.gov/geo/ ftp://ftp2.census.gov/geo/


3

Shapefiles, which use the older dBase specs, do not support null values. If you must maintain null values and you have to keep the file format to shapefile, you'll need to use a representative or 'nodata' value for it. This can be any value you wouldn't normally encounter or expect to encounter in the data, or that even falls within valid data's range, such ...


3

From the GDAL page for the Shapefile driver: SHPT_POLYGON shapefiles, reported as layers of type wkbPolygon, but depending on the number of parts of each geometry, the actual type can be either OGRPolygon or OGRMultiPolygon. So the answer to your question is YES ;-)


3

The "Phantom" feature likely is an invalid one, you should try to make valid it. To fix the feature you can: use the Check Geometry tool (Vector->Geometry tools->Check Geometry Validity). This allows you to find invalid geometries. In this case you have to fix the feature manually by editing it. use the Processing LWGEOM plugin: ...


2

You can rt click on the shapefile in arcmap and click export data, then you can choose the same reference system or the same as your data frame. Give a new name and at the bottom drop down menu make sure to choose shapefile. You can also select certain ones with the selection tool. Those highlight then rt. click and export data and only those selected ...


2

The Petrosys plug-in for Petrel is able to directly export vector data including contours and fault information into a variety of GIS formats through the spatial data translator. One easy workflow is to create a quick map of the Petrel model surface and faults directly from Petrel project, right click on them and elect to export. The export support outputs ...


2

As PolyGo and Brad noted, StackExchange does not host data itself. For a global dataset of inland waterways, SRTM may be the best source readily available. Have you looked at a description of the data. It is actually quite good resolution considering the extent. If you are interested in coastlines and will be working at various scales I also recommend ...


2

As commented by @jbchurchill and @user23715, I recommend checking your Output Coordinates setting under your Environments tab to see what it is set to. I/we do this because in the Point To Raster (Conversion) help it lists the Environments respected by that tool as being: Environments Compression, Current Workspace, Output Coordinate System, ...


2

You can use the Dissolve function on a column which contains attributes relating to a specific area. This should combine all separated polygons, such as those of Hawaii, into a single polygon.


2

Having written a shapefile reader for MapDotNet, I recommend following the dBase IV spec. Once you start opening files from many sources you will find odd discrepancies, for instance older versions of the PostGIS tools filled null numeric with *.


2

fc.next() is a simple iterator: fc = fiona.open("my.shp") first_feature = fc.next() second_feature = fc.next() ... Or more simply: for feat in fiona.open("my.shp") print feat The result is a Python dictionary. For example with one result (feat=) {'geometry': {'type': 'Point', 'coordinates': (180627.0, 330190.0)}, 'type': 'Feature', 'id': '154', ...


2

All of the vector formats supported by GDAL/OGR are listed here. With each driver, check out the creation options to control the output. These are passed to ogr2ogr using -dco and -lco flags. Good text-based output drivers include: CSV - be sure to use -lco GEOMETRY=AS_WKT to get the well-known text geometry GeoJSON GML KML LIBKML.


2

First you will need an iterator to go through your shape files, there are two methods I employ: Method One: a folder full of shape files: import arcpy, sys InF = sys.argv[1] arcpy.env.workspace=InF for fc in arcpy.ListFeatureClasses(): Method Two: a whole tree full of shape files: import sys, os, arcpy InFolder = sys.argv[1] for (path, dirs, files) ...


1

What you are looking for is Geographic Markup Language (GML). It is human readable and should maintain everything. -f gml in gdal / ogr. Do not overlook KML either. Both are human readable vector OGC standards supported in gdal / ogr. You can open both in text editors.


1

To change projections with Fiona, use the pyproj module. Example with a point shapefile (you can simplify the algorithm): from pyproj import Proj, transform import fiona from fiona.crs import from_epsg shape = fiona.open('sample.shp') original = Proj(shape.crs) # EPSG:4326 in your case destination = Proj(init='EPSG:...') # your new EPSG with ...


1

Didn't try but the most obvious is where do you save your new file? Or why if you want to do 'in-place' change, you only open the shp file without changing the mode to be able to write it. Also more in general, use the with statement like in official docs because for example in your code, you do not close the file whereas with with it's automatic.


1

the str( ) will display the internal structure of your object str(zambiap) If you just want a data.frame to export: dt<-data.frame(1:length(zambiap)) zambiapd <- SpatialPolygonsDataFrame(zambiap, data=dt) If you want a meaningful data.frame, you need to get the data from the zambiap object. dt.f<-NULL for (i in 1:length(zambiap)){ ...


1

SpatiaLite is one of the many potential solutions. It probably depends a bit on whether the shapefile you are working on is dynamic or its always the same file (or one of a few files of static content), but loading the shapefile using VirtualShape virtual table extension or the ImportSHP() SQL function will make it available in SpatiaLite. Then you can use ...


1

Using QGIS with the wanted features selected you can right click on the layer or go to the file menu and select "Save Selection as..." Choose Shapefile using the same projection as the original file. Done


1

Since you've already got a list of dicts, you can use Shapely (to manage the geometry) and Fiona (to write the shape file). from shapely.geometry import mapping from shapely.wkt import loads from fiona import collection schema = {'geometry': 'Point', 'properties': {'atribute1':'value', 'atribute2':'value'}} with collection("output.shp", "w", "ESRI ...


1

I'm going to answer the exact question you asked. If that isn't what you really meant, please update your question. Where from your website can I access worldwide vector water body shapefiles that have better resolution than the generic SRTM 90m data? You can't. This website (gis.stackexchange.com) is a Q&A site (per PolyGeo's comment on your ...



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