New answers tagged

1

thanks to Devdatta Tengshe EPSG 3857 or 4326 for GoogleMaps, OpenStreetMap and Leaflet i could figure out how to match the two independent shapefiles in QGIS: while QGIS would not allow me to change the projection file I could change it in R thanks to Normen Seemann ...


1

Use the Rasterize (Vector to Raster) tool in QGIS. Go to Raster -> Conversion -> Rasterize. Assuming your vector file and the reference raster (g) are in the same coordinate reference system (CRS), do the following: Browse the input file (shapefile). Define which attribute from shapefile to assign in the raster cells. Choose path and name for the output ...


0

There is now native export into DXF in newer versions of QGIS which allows to export map layers including the labels: More about the functionality can be found here: https://www.qgis.ch/en/projects/dxf-export The DXF export functionality was developed by J├╝rgen Fischer (Norbit) and Marco Hugentobler (Sourcepole AG). The project was co-financed by SIGE ...


0

As Goldring mentionned in his comment you should probably join the 2 tables and compute the percentage, assuming of course that your districts in both years do overlap


1

Save the style Layer (.qml or sld). Export .dgn to shp. Load your shp. Load style(.qml or .sld) for this shape.


0

Try browsing to the location you want to save your shapefile. The "save as" input field should have a path, for example: /Users/yourname/Desktop/example.shp


0

I am not sure If I understood your question here but have you looked at ENVI's tutorials or workflow here ? Here is the link to their tutorial or workflow : http://www.harrisgeospatial.com/docs/tutorials.html You may want to post your question on their ENVI related issues here http://www.harrisgeospatial.com/Support/Forums.aspx You may need to sign up and ...


1

Check Mapzen's metro extracts for Atlanta. They use OSM data and I believe they've also imported Fulton County's data into it. They also have different formats in case you need something other then shapefile


0

Fulton County has GIS data available. If you cannot access the data for download on their GIS website, give their GIS department a call/email and ask if they have an FTP site or other means to download the data.


1

The UK Data Service: Census Support host UK administrative geography shapefiles that can be downloaded directly through their Easy Download service. In an Rmd file to download and load parishes it can be as easy as inserting the following code into an appropriate chunk: if (dir.exists("parishes") == FALSE) { dir.create("parishes") } ...


0

It seems to that your .kml file might just link to a WMS (Web Mapping Service.) To find out, you can open you kml in a text editor, then look for an URL within the document. Look for WMS in the URL. If it's a WMS layer, then you cannot save it as a shapefile. WMS servers take the client request and push composite rasters back. However, if you are lucky, ...


0

It's odd, usually WMS are the kinds of data fetched online. If you can manage to identify where that KMZ is hosted either locally or remotely, it's just a few clicks away in QGIS -> add layer -> load it -> right click -> save as


1

Update: IMHO Shapefiles should be called deprecated these days. GeoPackage is a promising successor. It's similar to Spatialite but from OGC and it's been adopted by many software, inlcuding ArcGIS and OGR. See the official homepage http://www.geopackage.org/ and e.g. this presentation: http://www.slideshare.net/JeffYutzler/geopackage-swg-overview


1

I would take OGR (ogr2ogr) and set the layer creation option COLUMN_TYPES: -lco COLUMN_TYPES field1=INTEGER,field1=FLOAT8. That's another layer creation option as Mike T suggested above. In general, I would consider switching to GeoPackage since Shapefiles are deprecated and have deficiencies like field names limited to 10 chars.


4

The number width/precision is specified in the DBF file, as support by GDAL/OGR with get/set width/precision (i.e. see API). Looking at the documentation for the PostgreSQL / PostGIS driver, there is a PRECISION layer creation option: This may be "YES" to force new fields created on this layer to try and represent the width and precision information, if ...


1

For the second point you can use the Information_schema and select the needed columns. "SELECT column_name, data_type FROM information_schema.columns" and use this information in a loop with an ALTER TABLE statement together with SET DATA TYPE to change the types. This of course needs to be inside a loop for all tables which you also get from ...


1

Municipal ward level maps can be found here: https://github.com/mickeykedia/India-Maps


0

Global Mapper will batch convert many formats including .shp to .gpx. To use it: Open Global Mapper (need it installed) Go File>Batch Convert/Reproject. When the window "Select File Type to Convert From" appears- select Shapefile, click OK. When the window "Select File Type to Convert To" appears - select GPX(GPS eXchange Format), click OK. ...


0

The actual remote path was like: private const String NetworkShapeFilePath = @"\\NetworkServer\FakePath\_vectordata.shp" and I had it written like: private const String NetworkShapeFilePath = @"\\NetworkServer\FakePath\vector_data.shp"


4

Looks like you're trying to add data to the insert cursor one column at a time. Cursors think about the world one row at time. I recommend the following code. A few other notes... Python code runs in order, so make sure you declare your outpath variable before you set your env.workspace to outpath. Also, this code is going to create a shapefile with the ...


4

You are confusing terms and thus, confusing us. The expected input for kriging prediction in the gstat krige function is a systematic array of points and not polygons. It would also be nice if you provided a reproducible code example of what you have tried. You can use the extent of an sp object to create an array of points for the kriging prediction using ...


1

The following would do it with your directories: import arcpy InWork = ["D:\\GIS_Temp\Folder A", "D:\\GIS_Temp\\Folder"] for ws in InWork: arcpy.env.workspace = ws datasets = arcpy.ListFeatureClasses() for fc in datasets: newName = fc.replace(' ','_') arcpy.Rename_management(fc, newName[:-4]) Note the [:-4], which I do to ...


0

some sources for world ecoregions: http://www.worldwildlife.org/publications/terrestrial-ecoregions-of-the-world http://www.fs.fed.us/rm/ecoregions/products/map-ecoregions-continents/ hope some of this would be helpful Additionally, you could to arcgis online, and try to find ecoregions data to download. it is available, you just need to find it on their ...


2

I would use Rename_management to make sure you get all the parts to the shape file: import os, sys, arcpy InWork = sys.argv[1] # this script designed to be used as a tool, replace with a path if you wish arcpy.env.workspace = InWork for thisFC in arcpy.ListFeatureClasses(): newName = thisFC.replace(" ","_") arcpy.Rename_management(thisFC,newName) ...


1

Since you cannot really define contingency based on common boundaries (using something like spdep::poly2nb), you could use the polygon centroids to build a k nearest neighbor relationship. This will unfortunately not account for polygon size but is a good place to start. require(spdep) require(rgdal) polys <- readOGR(system.file("etc/shapes/", ...


2

--- gdal --- use gdal_contour function. documentation here ---- ArcGIS version----- posted before the software was specified Assuming you are using ArcGIS: 1. Convert the GeoTiff into ESRI GRID (esri raster format) using raster to other formats function, or simply import it in arcGIS and use save (export data) and save it as ESRI GRID. 2. use the Contour ...


2

ogr2ogr/ogrinfo are great tools...but also...PostgreSQL provides two built-in tools for exporting (pgsql2shp) and loading (shp2pgsql) shapefiles. They are easy to use and well documented...see the docs and this cheat sheet. Quoting the PostGIS 2.0 docs: An example session using the loader to create an input file and uploading it might look like this: ...


3

YES The -spat switch is completely optional, and the typical use case is probably not to use it. I never use it, because when doing a shapefile import I have never needed only part of the shapefile (or I would rather get it all into PostGIS and then do a spatial selection there). ogr2ogr will run and import all features in the shapefile. Your statement ...


0

QGIS can konvert shapefiles to DXF. Next step is to use https://cloudconvert.com/dxf-to-dwg BUT you'll need Dropbox, Google Drive, OneDrive or Box to store your DXF files, and the outputfile is also placed in Dropbox, Google Drive, OneDrive or Box. You can only use the free version for 25 conversions minuttes a day.


1

The point to line feature in arcgis requires data in a table to be ordered on the id for the group of points, i tried sorting the data but that didn't work still the point to line feature draws extra unnecessary lines but there was less extra liens this time,so my final solution was to use the point2one plugin in QGIS and that worked perfectly no extra ...


1

Use a permutation test. You begin by constructing a quantitative way to measure proximity. It could be anything you think relevant that measures typical distances between type-A and type-B buildings. Abstractly, given any configuration consisting of a layer X of type-A buildings and another layer Y of type-B buildings, let this measure be called t(X,Y). ...


1

I eventually gave up trying to load the large files - it does not seem to be possible with any tool. The other side of the coin was that the features I did manage to load took over 1 hr to do a simple STIntersects query. Solution: I cut up the large shapefiles using ogr2ogr based on county geometries and then uploaded them and associated them with the ...


0

You will need to determine a distance that is your threshold for whether or not Building B is "close" to a Building A. Use that distance to create buffers around Building A. Each Building A needs its own buffer so do not dissolve the output. Once you have your buffers, you can either Select By Location as esset mentioned or use an intersect to create a ...


1

You can do this with the "Select By Location" Tools. In ArcMap go to the meny "Selection" click "Select By Location". In the "Select By Location" window in "Target layers" chose your layer Building B. Then as "Source layer" you choose Building A. Then as "Spatial Selection method for target layer features" you choose an appropiate selection method. Why I ...


1

There is also a github project with stats and data layers in geoJSON format Github: Mapped-based data visualisations Specifically the files here


0

If I put your data in a text file in the format name;WKT 1;MULTIPOLYGON (((29.219629 -2.390692 0,29.219668 -2.391022 0,29.219668 -2.391265 0,29.219563 -2.391476 0,29.21951 -2.391655 0,29.219594 .... ))) it displays fine in QGIS, and can be saved as ashapefile. You need to use semicolon as separator of the delimited text. QGIS reports the geometry type as ...


6

I believe the answer by @iant is the best method to use (when you get it working, you should accept his answer). Just want to add that you can use the following expressions in your filter for your 3 individual rules (you can add rules by clicking the + as shown in the image, set the expression filter and the svg symbol): "myfield" < 1300 "myfield" > ...


5

I think your best option would be to use Rule Based classification - there are a number of tutorials available - I like this one from Linfiniti.


2

Building on Joseph's answer, you can delete any file in the Python console. This is a little script that will delete all the files with a shapefile-associated extension in the directory of the 'foo.shp' file you give it: import os, argparse def deleteShapefile(aDir, aFile): fnameNoExt = os.path.splitext(aFile)[0] extensions = ["shp", "shx", ...


1

You could also do this using the terminal and appropriate use of wildcards. For example, in bash running: rm 'path/to/file'.* will erase all the shapefile associated files for a particular file. It can be a bit dangerous though if you're not careful. I always try to be good and run the ls command (e.g., ls 'path/to/file'.*) to return a list of all files ...


2

That script is outdated. You can use the built in functionality of ArcGIS Desktop's ArcToolbox: http://desktop.arcgis.com/en/arcmap/latest/tools/conversion-toolbox/kml-to-layer.htm It's in the Conversion Tools toolbox, and then inside From KML.


2

A good source would be OSM and select based on the Admin level. Downloading all the OSM data for the world would be a pain if you just want cities, but you can try the Metro Areas extract (see here),


1

Not sure if you can do this using the GUI but you can certainly do this using the Python Console. The following code goes into the specified path and deletes all files beginning with "File_Name": import glob, os path = 'path/to/folder//' for fname in glob.glob(path + "File_Name.*"): os.remove(fname) Edit: Responding to the comment from ...


1

To properly convert points into lines, you need to have a unique field which has a same value for each group of points so that ArcGIS can recognize that these group of points with a same value represents one line. Without a unique field, the output lines will be mixed lines crossing each other. You refer to the Points To Line help for more information. ...


0

The correct format for your data is not a Multipolygon but a simple Polygon with 3D coordinates 'POLYGON Z ((30.389763 -1.778877 0, 30.39029 -1.778926 0, 30.390932 -1.778926 0, 30.391557 -1.778909 0, 30.392068 -1.778876 0, 30.389763 -1.778877 0))' But as all the Z values = 0 you can use 'POLYGON ((30.389763 -1.778877, 30.39029 -1.778926, 30.390932 ...


0

I hope this sums up the question: Google does not lable polygons but it does lable points. In order to have a label in google earth for the Points you need to fill the column name (of your attribute table in qgis) you want into the NameField in the save as menue from the layer within qgis.


1

The WKT you have there is not correct it seems, the syntax is wrong. You have a space-charakter at the wrong place. For example the -1.778877_0,30.39029 has a space, then a zero then the comma for the next coordinate pair. If this is intended and you want to have the Z-Value you need MultipolygonZ (that is not supported). Also its strange to have a ...


0

International Boundary & Water Commission USA and Mexico has a link of GIS. http://www.ibwc.state.gov/GIS_Maps/GIS_Links.html


0

For country borders and those on lower administrative levels, have a look at gadm. I think the datasets are free for non-commercial use.


2

Schema is something different. Schema is in database, not somewhere with your shapefile. When you created new database, and also extensions by: CREATE EXTENSION POSTGIS; You've created new schemas in your database: public and topology. Look at the picture below: In each of my databases, there are schemas. You can create new schemas, just check the ...



Top 50 recent answers are included