Tag Info

New answers tagged

0

You can try with ogr2ogr, if your db encoding is UTF8 use this command : ogr2ogr -f "ESRI Shapefile" c:\shape.shp PG:"dbname=db_name user=user_name password=xxxx host=serveur_192.168.1.1 port=5432" -sql "select table_id, table_name, geom from table" -overwrite -lco ENCODING=UTF-8 You just need to change these variables : db_name, user_name, xxxx, ...


0

The umlauts are not lost. You are looking inside your Postgis table with UTF-8 encoding, and into the .dbf table with System encoding. If you open the .dbf file in Libre Office, you will be asked for the encoding. Select UTF-8 and the content is readable. You can load the shapefile (or the Postgis table directly) into QGIS, setting encoding to UTF-8 or ...


0

THe short answer is: I can;t see a way. However, changing attributes on a feature is time consuming at times (I have have a hard time figuring out why it happens). Thus, this should speed up your code a bit: pr.addAttributes( [QgsField(aName, QVariant.Double) ] ) attrs={} #------ # Add Values to Triangle Features in Values ...


0

I got support's answer. They said it is well known issue and quote from this documentation is wrong: Date fields support either the date or the time, but not both in the same field. Document will be changed soon. Also they said that I could use text field for time values in shape file.


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

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 ...


1

Join the tables together. Right Click on the point shapefile and join it with the line shapefile.


0

You might try disabling Hardware Acceleration. If not supported, having that enabled could be taxing on your machine. You can disable it by: Customize --> ArcMap Options --> Data View --> Hardware Acceleration Give that a try, and I hope it helps!


0

Just found one right after I posted this. http://www.blm.gov/nm/st/en/prog/more/geographic_sciences/spatial_data_metadata.html Followed the link for "Survey LandNet" which is a download for very detailed survey data.


1

Lots of questions cause your question is too broad and subject is not as simple as it seems... Writing complete resolution for you could take few hours (!!!) so I'll only write down my line of thinking, it should give you direction which way to go. You have to achieve road network data to count routes... OSM should be good enough. Convert data into graph ...


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 ...


0

You can use ogr2ogr to reproject the shapefile. I would probably just write a shell script to call ogr2ogr before calling your python script, but there is a Python interface to ogr2ogr. It's explained here. (That example is how to convert gml to shapefile. Near the bottom of this page you can find an example of how to reproject, though not the python part.)


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

The GADM database of Global Administrative Areas has downloadable shapefile up to level four for Viet Nam http://www.gadm.org/


0

I don't use QGIS, but with ArcGIS, PDF export has always been tricky, especially with large datasets, at small scales and with poorly designed map documents. In general, I don't think PDF is a good geographic data visualization format because it has no concept of scale-dependent visibility, generalization, etc. But as it is the most popular "print" format, ...


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 ...


0

Fixed it. typeBuilder.add("geom", Point.class); should be: typeBuilder.add("the_geom", Point.class); Not sure why it worked before then. Either I don't remember changing that line (not sure why I would though), or perhaps some earlier version of GeoTools just "geom" worked. Looks like I may have picked it up from part of the javadoc that did not get ...


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 *.


0

You might run into a problem crossing the +-180°E border in EPSG:4326. Some points may be rendered at the wrong side, shifted off 360° horizontally. This is how it should look like: Cropping the data to +-179.9 °E might solve your problem.


0

So over the weekend I found that my coordinate system stays constant if I output the raster to a TIF instead of GRID. I don't know if I can work all the Spatial Analyst tools with a TIF as well, so will have to try and see which format works better for me... Thank you for your help! :)


0

At the simplest level, you must loop through each polygon in your shapefile and check to see if they point is inside it. You can stop the loop when you find the right polygon. You can speed this process up a little bit by checking if the point is inside the extent of the polygon. By checking the extent first you are quickly narrowing the possibilies by ...


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)){ ...


0

You do not need any reverse engineering. ogr2ogr is able to read the projection information from prj file for you. Just execute: ogr2ogr -t_srs EPSG:4326 -f geoJSON -lco COORDINATE_PRECISION=7 future.geojson your_shapefile.shp


0

I agree that @nhopton's answer solves the OP's problem as VMD is a cartographic product and not a routing one. For what it's worth though, I have created two routeable networks using PgRouting and OS datasets. I have a full UK "quick and dirty" network made using the OS Strategi shapefiles and a more detailed network of Scottish roads from ITN (Integrated ...


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, ...


0

Off the top of my head, I don't think that you will get a line string or polgon string of x and y values in csv. I believe that you will only receive point values if you pick csv. You will have a column for x and a column for y. The gdal libraries that read shapefiles treat the three files as one animal. These libraries already do all the work of ...


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.


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.


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 ...


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 ...


0

There are a ton of free software out there that will allow you to export the polygon and see the lat long coordinates of it. Your question was answered previously How to export Polygons to CSV with coordinates?


0

FAO uses a lot the GAUL dataset which contains shapefiles at level 0 (country), 1 and 2. Metadata information are available here: http://www.fao.org/geonetwork/srv/en/main.home?uuid=f7e7adb0-88fd-11da-a88f-000d939bc5d8 Access constraints requires "Formal permission to do something"


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


0

You can buffer the point and save it. Then in QGIS go to Vector -> Data Management Tools -> Merge shapefiles to one. If you want geojson, then you can now convert the merged shapefiles to geojson.


-2

Try using Geomedia software to convert the DGNv7/v8 file into a feature file with its native projection intact. How smoothly it handles and shows its cell also.


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', ...


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, ...


0

Did you try the QGIS for Android? It is still in a rather early developement stage, but it should do the trick. You can find it here: http://hub.qgis.org/projects/android-qgis


0

A generic Java answer is: Use the BigDecimal class. Hope this will work with your specific implementation too...


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 ...


0

First, if you don't have a geometry/geography column in the table yet, add it by converting WKT or WKB to geometry/geography using SQL Server Spatial (STLineFromText, STPOlyFromText, STPointFromWKT, similarily works from WKB). Then, simply connect to the database (Database Connection) and create a query layer. At this point, you'll have a layer in the ...


1

Indeed, the whole calculation is better done in excel, thanks for the attention anyway!


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 ...


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 ...


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/


1

This site looks like it's got some unique data as well: http://www.naturalearthdata.com/


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 ...



Top 50 recent answers are included