Tag Info

Hot answers tagged

7

I advise merging your shapefiles into a single folder (using a program or search/copy/paste or a small script such as the one Mark C recommends in the comments). Then use this rather elegant bit of code from gis-programming.com: as above, use: ogr2ogr merge.shp file1.shp to create a shapefile merge containing the data of file1 then: for %f in ...


7

You need to finish the polygon's construction with double click, right-click>Finish Sketch or F2 before saving edits.


7

You can add your .dbf table into ArcMap and then create an XY event layer which you will be able to export to a shapefile. Read more details here: Adding x,y coordinate data as a layer


6

ERROR: **function addGeometrycolumn**(unknown, unknown, unknown, unknown,unknown, integer) does not exist It seems that PostGIS is not yet installed. PostGIS is an extension of Postgres which allows the use of geographic files. Install it and your import will work fine.


5

Load the data into SpatiaLite in QGIS... best way is to create a new SpatiaLite database via the right-click GUI in the browser window, then simply drag and drop your shapefile onto the SpatiaLite database you just created. From there you have all the power of SpatiaLite at your disposal. Some more documentation can be found here, and there's the SpatiaLite ...


5

On the page that you linked to, there is a note on the bottom: DATUM: SAD-69/original PROJEÇÃO CARTOGRÁFICA: UTM-22 (-51º) OBS.: Devido ao uso do DATUM SAD-69/original por Curitiba, para converter para SIRGAS-2000, devem-se utilizar os parâmetros locais de transformação de coordenadas descritos abaixo: SAD-69/original(Curitiba) -> ...


4

I would recommend displaying your data using SVG (xml based vector image format). There are tools available to convert shapefiles directly to SVG format, which you can then embed directly on your webpage with html. The SVG file will contain coordinates of your shapefile data in a simple xml format. A useful tool for this is shp2svg. ...


4

The projection part of the .prj file declares units as meters, so that is what you get. If your data is in degrees, you have to use a .prj file for EPSG:4326: GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] without any projection information. Looking at the ...


3

There are several libraries that can achieve this. If you want a pure python-solution ( no wrappers for C-code ..) use pyshape but be aware that it "just" reads and writes shapefiles. However, Joel Lawhead, the author of pyshape, also shows examples of displaying shapefiles in his book "Learning Geospatial Analysis with Python" (packt), e.g. using the ...


3

Seems this question can't be answered with gdal/ogr. Here is another method to join csv and shapefile from linux shell. This method uses a postgres/postgis database : Import your shape in postgres database with shp2pgsql Do the same for the csv (psql) Make a sql join between the shape and the csv (use sql query with Inner join) Export the result as a ...


3

This could easily be converted into a toolbox script or run directly from the python window in Arcmap. It can be improved by validating the layer name before copying, duplicate naming conventions, drilling into group layers, using different data frames, etc. But this should get you started for a simple TOC: import os, arcpy folder = "path\to\folder" ...


2

NaturalEarth has a worldwide railroads layer. It maps the rail lines and has no indication of whether they are used for passenger or cargo travel.


2

Found some information which might be of some use to you: Shapefile containing the majority of railroads in Europe (doesn't differentiate between passenger-only and trade-only railways) http://www.mapcruzin.com/download-shapefile/europe-railways-shape.zip Similar to above except you can download railroad shapefiles specifically by country ...


2

Sure,I understood the problem and only mentioned some complications in general case.But for a simple solution it is possible to write an ArcMap solution(sorry I don't know much about Python/ArcPy so I use C#) which only implements a command button and this button can be dragged into one ArcMap toolbar from ArcMap/Tools/Options. In the Click event of this ...


2

There shouldn't be any reason why you can't run a Frequency on the attributes of a 12m feature shapefile with ArcGIS, but the SQL query equivalent is a basic GROUP BY: SELECT org, protocol, map, count(*) Cnt_map FROM table1 GROUP BY org, protocol, map ORDER BY org, protocol, map You could even order by the frequency in the computed column so that most ...


2

this python code adds FILENAME field to all Featureclasses in a Dataset and populates with featureclass name. # Import standard library modules import arcpy, os, sys from arcpy import env # Allow for file overwrite arcpy.env.overwriteOutput = True # Set the workspace directory env.workspace = r"P:\geodatabase.gdb\filename" # Get the list of the ...


2

This is very easily done by adding each of these data sources to a map and then Creating a map package: Map packages (.mpk) make it easy to share complete map documents with others. A map package contains a map document (.mxd) and the data referenced by the layers it contains, packaged into one convenient, portable file. The same functionality is ...


2

If you want a new shapefile, containing just some of the existing parcels, but no others, simply query for, or select the ones you want, then right-click on the layer select Data, then Export Data. If you have an existing shapefile follow the advise of @Maksim


2

CLU isn't available to the general public. It's considered PII now. None the less. It's doesn't cover all ground, just those involved in USDA programs. Plus, the boundaries don't always match up with what's actually going on the ground. For example, a producer decides to crop one part of a field in beans and the other in corn. The CLU boundary may not ...


2

Since HTML5 announcement flash support has dropped, and adobe has ditched flex, and now they predict that (flash, silverlight, java) will die so for the moment the future is for HTML5 and JS.


2

You can create another layer, draw a box by your coordinates and follow the already referenced answer How to crop Shapefiles in QGIS?. I would myself use ogr2ogr with the -spat parameter. If you want also to clip the selected features with the selection box use -clipsrc [xmin ymin xmax ymax]| http://gdal.org/ogr2ogr.html QGIS Processing toolbox has a ...


1

When I worked at NRCS, we used CLU layers, which followed tracts of fields. I don't see them at http://datagateway.nrcs.usda.gov/. However, if this is a serious request for data and you are willing to put some time into it, you should give your local county field office (either NRCS or FSA) a phone call. They are usually happy to help, and if you ask to talk ...


1

Either make a selection of the polygons you need, right click, copy, then paste into your new shapefile in the interactive window. Or, use append, to add the selected polygons to a shapefile of your choosing.


1

You can do this in QGIS using the Zonal Statistics tool: you can analyze the results of a thematic classification. It allows to calculate several values of the pixels of a raster layer with the help of a polygonal vector layer (see figure_zonal_statistics). You can calculate the sum, the mean value and the total count of the pixels that are ...


1

There are java bindings for GDAL/ogr - see http://gdal.org/java/ . No idea if they work on Android, though. Apparently ( https://www.google.de/search?q=gdal+on+android ) building gdal on Android is not really easy. http://sourceforge.net/projects/javashapefilere/ seems to be another option. Also ...


1

OpenStreetmap seems to have some data: http://www.itoworld.com/map/4?lon=84.67111&lat=24.56236&zoom=7&fullscreen=true You can get the full source data of India from Geofabrik , and filter for the items you are interested in. But don't expect the data to be complete.


1

First thing is that you're creating postgis extension on whole database not on single schema. Second thing is you set the search_path if you don't wont to write schema name before every tablename, so notation 'different_schema.field_polygons' will work without setting patch. I think the trouble is somewhere else... You're trying to create shapefile with only ...


1

GeoServer has native support for Shape Files. You can add them individually or by folder. It's not recommended for production environments, but it is quite good. You don't say anything about what mapping technologies you propose to use. OpenLayers will allow you to show overlays over a Bing map.


1

I would suggest to export the shapefile(s) to SQlite or FileGDB (which should perform better in QGIS). You can either do this in QGIS GUI (right click on layer a select Save As), or use OSGeo4WShell to covert using ogr2ogr, e.g. command: ogr2ogr -f "FileGDB" C:/Temp/myshp.shp C:/Temp/test.gdb OR ogr2ogr -f "SQLite" C:/Temp/myshp.shp C:/Temp/test.sqlite ...


1

Benno, you can use Spatial Manager Desktop, the Professional edition can read and write the formats you said(among others), and also supports the execution of tasks from the command line. You can download a trial version (limited), here: http://www.spatialmanager.com/downloads/ Hope this helps Disclaimer: I work for Opencartis (Spatial Manager ...



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