Tag Info

New answers tagged

1

I would use Tabulate Area (Spatial Analyst) rather than Zonal Statistics if you are after proportions. import arcpy from arcpy import env from arcpy.sa import * env.workspace = "C:/sapyexamples/data" TabulateArea("zonedata.shp", "IDStr", "valueraster", "VALUE", "C:/sapyexamples/output/areatable.dbf", 2)


1

The elevation service on ArcGIS Online includes ready to use worldwide data, and also a built in raster function to generate aspect. It's also pretty simple to filter simultaneously for a range of aspect values (290-250 degrees) as well as elevation (e.g. 0 to 10 meters, depending on how you define a beach - or perhaps you already have the beaches ...


1

You have almost the whole process. After selecting the features you want to have in a separate shapefile (so that they are colored like in the picture), right-click the layer in Table of contents (the list to the left), --> Data --> Export data. Choose where to save the file. To save the rest to a different shapefile, use the highlighted button (switch ...


3

I figured it out so I'm posting the answer here: geojson = open('shp.json', "w", encoding='utf-8') Add encoding='utf-8' to this line while creating json file. Works great!


3

This tool is there in Route Editing Drag from this box to your interface toolbar.


1

As many have already said, the availability of drivers in rgdal in R for both raster and vector data always depends on the underlying GDAL installation. If that has the driver, then it will work on readGDAL/writeGDAL or readOGR/writeOGR. If it does not have it, you need to upgrade your own GDAL and reinstall rgdal. Most questions about drivers come from ...


1

The basic answer to creating a boundary is to use the Minimum Bounding Geometry tool. You probably want to choose the Convex Hull geometry type*. Assuming you want a distinct boundary around each class, you can first use Select by Attribute (e.g., "CLASS = 1") so only a subset of features is actively selected. In that case, the Minimum Bounding Geometry ...


1

Provided that you have the attributes loaded into the shapefile (a field of classification - Class1, Class2 etc), you could use categories > Unique Values in the Symbology tab of the Layer Properties window. Minimum Bounding Geometry (Data Management) tool would create a bounding box around your points.


0

If your example is typical of what you are trying to select then if you convert your input dataset into a file geodatabase featureclass you could use the sql expression: SUBSTRING( B, 1 , 3) = A This will select rows where the first 3 characters of field B match the entire contents of field A.


1

Hava a look at OpenStreetMap. Take a look at this relation: http://www.openstreetmap.org/relation/3250963 where Telangana is included. You can download OSM land polygons from here: http://openstreetmapdata.com/data/land-polygons or daily updated data from here: http://download.geofabrik.de/asia/india.html


0

Append &outputformat=SHAPE-ZIP to the request, as in this example (replace the ws_world:world_cities with ur workspace and layer) http://hostname.com/geoserver/ws_world/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=ws_world:world_cities&maxfeatures=50&outputformat=SHAPE-ZIP


1

It depends on how many files you need to convert. If you have a lot, a simple solution is to install the free GeoServer and publish all the shapefiles as WMS or WFS (depending on use-case). Geoserver handles the delivery and you do not need to no any conversion. This will allow you to overlay them in most web map scenarios without overloading your client ...


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


0

You can convert your shapefile to GeoJSON and use tools like leaflet to Display it in an HTML page. To convert a shapefile to GeoJSON you can use Quantum GIS (It's a great GIS tool). and also there is online convertion services: http://ogre.adc4gis.com/ or http://www.mapshaper.org/


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


0

Rather than thinking about merging A/B and trying to avoid merging A/E, merge them all together into a single lake polygon (I'm hoping here your data model does at least include a unique code for the lakes) with ST_Union. Then, use ST_DumpRings() to get just the rings. Then add the skeleton lines for just that lake to the collection. Then use ST_Polygonize() ...


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

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


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


1

The definition for MGI_Austria_Lambert is straight from Esri software. It has several differences in naming conventions plus quirks in the projection/parameter names. Some of these date to older versions of the EPSG Geodetic Parameter Registry where Esri has not updated to match EPSG. Esri has one keyword for Lambert conformal conic and it's possible to ...


1

You should use rgdal, specifically writeOGR (which is for vector data) to write the table to Postgis. Note that you must have a spatialdataframe as designated by the sp package (autoloaded with rgdal), I suspect your results of rasterToContour are the correct format. #R code assumes library(rgdal) writeOGR(x, "PG:dbname='BDDMeteo' user=user ...


0

I had problems setting fields to Long Integer in Access only to have them converted by ArcGIS to Double when exporting them to their final format using either ArcCatalog or ArcToolbox. The solution I found was to load the feature set, or table, into ArcMap while it is still in Microsoft Access and then right-clicking on the feature set/table and choosing ...


0

You might try a system like rpostgresql which allows you to simply connect to your postgresql / postgis database rather than exporting the tables out of your database. Another link: http://cran.r-project.org/web/packages/RPostgreSQL/index.html Database interface and PostgreSQL driver for R This package provides a Database Interface (DBI) compliant ...


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


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


7

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


0

GROUPS adjacent slightly different cells extension - Spatial Analyst --------------------------------------------------------------------------- import arcpy, traceback, sys from arcpy import env env.overwriteOutput = True import numpy try: def showPyMessage(): arcpy.AddMessage(str(time.ctime()) + " - " + message) load input raster to array and ...


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


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.


0

You have a different projection in your psql; and having a projection is not necessary. Is there a schema you want to add the shape file to? This should work: shp2pgsql -s 4326 -I worldcountries.shp schema.worldcountries > dr_worldcountries.sql psql -f worldcountries.sql -h [host] -d [database] -U postgres


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.


1

I think you could try passing through OSM files. Convert your shp to OSM format with http://wiki.openstreetmap.org/wiki/Shp-to-osm.jar (you have to write a mapping of your columns to OSM tags) Convert this OSM file to Mapsforge with the Map Writer https://code.google.com/p/mapsforge/wiki/GettingStartedMapWriter


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


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


0

It seems that solution here is using raster itself. I've tried to reproduce raster with 'similar' cell values in different zones using set of polygons (142 total), distance to their boundaries and maximum distance inside individual polygon. Max distance minus actuall distance produced areas with breaks in values at the boundary. Raster cellsize is 1. It is ...


0

Have a closer look at openmapsurfer ... choose a grayscale layer and the boundary overlay, and zoom to the area you are interested in ... boundary visible? Then try boundary service by OSM-user wambacher ... choose the country and province etc from the tree menu at the left. Then you can export the boundary silhouette in different formats.


0

I guess you are mixing different things: OSM (and different other map providers, too) deliver maps as so called 'tiles' that are delivered and organized via a so called Tile Map Service standard. You can find the specs for the URL (or folder) structures here. You find different servers that support a TMS rendering. OSM itself uses Mapnik, that supports ...


1

I ran into this exact problem because I hadn't extracted the zip file into the working directory. I was rushing to get the files converted and when I checked to make sure they were there, the "preview" that I got when I double-clicked on the zipped file tricked me into thinking they were available for conversion. Even if this wasn't the solution to your ...


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


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


0

I got this to work. But thank you to everyone who answered and their awesome ideas! I'll explore each of them. I used Global Mapper which has the option to search directories and its sub-directories for selected file types (File > Open all files in a directory tree). It took around 12 hours to load the shapefiles from 50,000 sub-folders and then I selected ...


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


0

All the code you would need is available in GeoTools but it will probably not work in a mobile environment. However looking at the code might give you a start provided you can live with a LGPL license.


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


0

Sometimes the error isn't in the attribute value but in the attribute name. Be sure that attribute names don't have spaces or special characters.


0

You can use Spatial Manager Desktop to import shapefiles into PostGIS. Please, watch this post: http://www.spatialmanager.com/import-directly-postgis-databases/ There is a limited trial version ,you can download it here: http://www.spatialmanager.com/downloads/ If you need help on this feel free to tell me. Disclaimer: I work for Opencartis (Spatial ...


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.


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

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


0

You have to find out the correct encoding of the shapefile. Sometimes metadata aren't helpful at all and the only way is trial and error (try all common encodings for your language in Layer Properties dialog until the attribute data displays correctly in QGIS attribute table). Then, set this encoding while importing and the driver will convert it to UTF on ...



Top 50 recent answers are included