Skip to main content

All Questions

Tagged with or
Filter by
Sorted by
Tagged with
124 votes
8 answers
370k views

Calculating polygon areas in shapefile using QGIS

How do I calculate areas of an area shapefile in square meters (m²) or in acres (ha)? I didn't find that functionality in the Vector Tools.
desputin's user avatar
  • 2,331
116 votes
5 answers
302k views

Merging multiple vector layers to one layer using QGIS

I've imported several shapefiles which where exported from a Mapinfo .tab. Several .tab-files are imported resulting in 20+ layers. Afterwards I want to export it to GeoJSON; but I'm reluctant to ...
stUrb's user avatar
  • 2,329
115 votes
23 answers
144k views

Converting between KML and shapefile (SHP) format

My users are sending me point data that were digitized using Google Earth. How can I convert their KML to a shapefile and vice versa?
TroutSlayer's user avatar
  • 1,373
108 votes
16 answers
76k views

Identifying Coordinate System of Shapefile when Unknown?

I have a Shapefile but its coordinate system is Unknown, and there is no *.prj file. How can I identify it now?
com's user avatar
  • 3,694
96 votes
5 answers
157k views

Renaming attributes/fields in shapefile attribute table using QGIS

I would like to rename some fields in my attribute table: Like rename "XRF_N3"in something else. It seems quite a easy issue but I don't find any information about how can I do that.
G M's user avatar
  • 2,078
75 votes
6 answers
286k views

Opening shapefile in R?

I need to open a shapefile from ArcMap in R to use it for further geostatistical analysis. I've converted it into ASCII text file, but in R it is recognized as data.frame. Coordinates function doesn't ...
slava's user avatar
  • 751
70 votes
7 answers
4k views

Are there any attempts to replace the shapefile? [closed]

Recently I've been spending a lot of time converting perfectly good field names like "Percent of citizens age 25 and over with a bachelor's degree or higher" into things like "edbchogtr" to meet the ...
canisrufus's user avatar
  • 2,474
61 votes
5 answers
48k views

Bypassing 10 character limit of field name in shapefiles?

I'm exporting geometry with attached text attributes from oracle database to esri shapefile format (.shp) with Java and Geotools library. Attribute columns in our database have names with more than ...
denu's user avatar
  • 839
58 votes
6 answers
58k views

Is there an automatic function in QGIS to package all files in a project for transferability?

In my project, I use a lot of geodata from different directories. Now I want to give the QGIS project to a colleague (eg on a CD). Is it possible to copy the shapes from different directories ...
Hendrik Pehlke's user avatar
57 votes
3 answers
54k views

How can I get a shapefile from a postgis query?

My data is in a PostGIS database. I would like to generate a shapefile from a query. How can I do that?
rudivonstaden's user avatar
57 votes
5 answers
75k views

Which character encoding is used by the DBF file in shapefiles?

Which character-encoding is used by the dbf-file in shapefiles? It seems it is handled different, based on the program and the local encoding-settings of the machine. Which encoding is 'right' - ...
Mnementh's user avatar
  • 1,155
54 votes
2 answers
96k views

Understanding difference between Polygon and Multipolygon for shapefiles in QGIS?

Creating Scratch layer gives me a choice between Polygon and Multipolygon, so I started wondering how should I make use of them. Reading a new book "Mastering QGIS" (through this answer by Joseph to ...
Kazuhito's user avatar
  • 31.2k
53 votes
3 answers
76k views

Reprojecting vector layer in QGIS

I have a series of layers of lines (shapefiles) in My Project. The CRS of some are different and to merge them they all must have same CRS. When I use Processing > Toolbox > Qgis_algorithims >...
razi's user avatar
  • 531
50 votes
4 answers
65k views

Joining non-spatial CSV file to spatial data (shapefile) using QGIS

I have a CSV file which has postcode data in a field, but it is non-spatial e.g. no Easting and Northing. I have a shapefile with postcode in a field and some additional data. I want to join the ...
gisuser's user avatar
  • 545
48 votes
3 answers
61k views

Adding shapefiles to PostGIS database

I was able to create a Postgresql database and then I executed, createlang plpgsql geospecies psql -d geospecies -f postgis.sql psql -d geospecies -f spatial_ref_sys.sql So now can I directly import ...
Sam007's user avatar
  • 4,415
43 votes
7 answers
39k views

Choosing File Geodatabase (*.gdb), Personal Geodatabase (*.mdb) or shapefile format?

Previously, I have used geodatabases as an easy way to keep all files together rather than having dozens of shapefiles all over the place, and it is easier when finally exporting all the relevant data ...
43 votes
3 answers
29k views

Is it possible to look at the contents of Shapefile using Python without an ArcMap license?

I wondered if it is possible to look at the contents of a shapefile using Python without having and ArcMap license. The situation is that you can create shapefiles from many different applications, ...
Caitlin's user avatar
  • 433
40 votes
15 answers
121k views

Converting MapInfo TAB and/or MIF to SHP using free tools or ArcGIS for Desktop core product?

How do I convert MapInfo TAB and/or MIF files to SHP using only free tools or ArcGIS itself? I've not had much luck trying to do this in the past and I don't want to have to shell out for the ArcGIS ...
Charles Roper's user avatar
39 votes
5 answers
80k views

Writing Shapely geometries to shapefiles

Can someone demonstrate a simple way to write geometry data-structures from shapely into shapefiles? I am particularly interested in polygons with holes and linestrings. It would also be beneficial to ...
terra_matics's user avatar
38 votes
4 answers
31k views

Simple thematic mapping of shapefile using Python?

I wish to visualize geographical data in Python, without using ArcGIS/ArcPy, and make a map. On the internet I found how to make a thematic map using Python: Here is some code that I tried: ...
NYannickske's user avatar
38 votes
10 answers
78k views

Adding Attribute data to shapefile?

I can display a shapefile in openlayers but I need to add some attribute data. I can open the dbf file in excel but there is no save as option in excel to the updated file as a dbf. What is the ...
ChrisJ's user avatar
  • 1,129
38 votes
10 answers
36k views

Open Source Tool capable of reading Esri File Geodatabase (.gdb)?

I have an ESRI File Geodatabase (.gdb) file that I would like to convert to shapefile (or any other non-proprietary format). Are there any Open Source tools to do so?
Darren Cope's user avatar
  • 6,666
37 votes
6 answers
59k views

Converting .shp into .gpx using QGIS

I would like to convert .shp into .gpx. Using GIS, I open my shapefile and I tried to "save as" gpx but it gives an OGR error: creation of field ObjectId failed (OGR error: Field of name '...
ePascoal's user avatar
  • 951
36 votes
5 answers
10k views

Advantages of using spatialite over shapefile? [closed]

I found spatialite more useful than shapefiles as it does not have the limitations of shapefile and it is also portable. Many people here use shapefiles to exchange data and even the experts do not ...
neogeomat's user avatar
  • 8,390
35 votes
6 answers
60k views

Free tool to convert ArcGIS layer package (*.lpk) to shapefile (*.shp)?

I have received a *.lpk file from Esri's ArcGIS platform that I would like to convert to a shapefile. How can I do this, using only free software?
Zach's user avatar
  • 843
34 votes
5 answers
13k views

Bulk load multiple shapefiles into PostGIS

I've got over a hundred data layers in shapefile format that I want to upload into a PostGIS database. They are all in the same projection, but represent different data layers so they do not have the ...
RyanKDalton's user avatar
  • 23.2k
34 votes
6 answers
29k views

GeoJSON too bulky

I am using leaflet.js to allow web users to select a region. Valid regions are US states, Canadian providences, and world countries (except for US and Canada). I constructed a shapefile myself using ...
Mike Furlender's user avatar
34 votes
3 answers
20k views

How to easily edit attribute data using Regular Expressions?

I am writing a tutorial for MSc students that uses QGIS. One of the tasks requires the attribute data to be modified (see pdf draft of tutorial here if interested ). The question is how to get them ...
RobinLovelace's user avatar
33 votes
12 answers
63k views

Converting shapefiles to text (ASCII) files? [duplicate]

How can I convert a shapefile (GIS) to text, or, how can I extract the information in a shapefile?
juanpablo's user avatar
  • 431
32 votes
8 answers
29k views

Getting list of distinct values from shapefile field using QGIS

I have a shapefile whose features I can filter by specifying a where clause in the query dialogue. F.x. I have a field named "city_name" and by stating "city_name" = 'London' in ...
Raffael's user avatar
  • 550
32 votes
3 answers
43k views

How to encode shapefiles from LATIN1 to UTF-8?

Is there a way to encode shapefiles from LATIN1 to UTF-8?
againstflow's user avatar
  • 5,054
32 votes
6 answers
2k views

"Oddities" in the Shapefile technical specification

I've been writing a shapefile parsing library, and have encountered a couple of design decisions in the specification that I don't immediately understand. I'm hoping there's a wizened old ESRI ...
canisrufus's user avatar
  • 2,474
31 votes
8 answers
24k views

Using ogr2ogr to convert all shapefiles in directory?

I have a directory with several shapefiles. How can convert all these shapefiles to MapInfo with ogr2ogr? I know how I can convert one file. And I can make a batch script writing a line for each ...
Stefan's user avatar
  • 2,152
30 votes
6 answers
35k views

Using ogr2ogr to convert GML to shapefile in Python?

I am trying to convert a GML to an ESRI shapefile using ogr2ogr utility in a python script. I have successfully installed the GDAL/OGR package via osgeo but I am now struggling to find/understand ...
Matt's user avatar
  • 2,706
30 votes
2 answers
7k views

Using OGR and Shapely more efficiently? [closed]

I'm looking for some suggestions about how to make my python code more efficient. Normally efficiency doesn't matter for me but I am now working with a text file of US locations with over 1.5 million ...
GrantD's user avatar
  • 309
29 votes
3 answers
106k views

Cropping Shapefiles in QGIS?

I need to clip a large and very detailed shapefile in QGIS showing environmental data similar to a temperature map. Is there something like the very simple crop tool like in Adobe Photoshop where ...
birgit's user avatar
  • 525
29 votes
7 answers
15k views

How can I update ogr2ogr to include the PostgreSQL driver?

I'm trying to use ogr2ogr to upload a shapefile to a remote PostGres installation. When I ran this command: celenius:~ celenius$ ogr2ogr -f PostgreSQL PG:"host=255.34.00.00 user=postgres dbname=mydb ...
djq's user avatar
  • 16.3k
29 votes
5 answers
36k views

Converting image of map into vector format [closed]

What is the best way of converting a gif of a map into a vector format, such as a shapefile? The only relevant parts that I am interested in are the outline of the island so I realize some manual ...
djq's user avatar
  • 16.3k
29 votes
3 answers
23k views

Selecting feature types when using ogr2ogr to convert to shapefile?

Shapefiles can only have one geometry type, but many other formats (kml, geojson) can have multiple types. When converting to shapefiles, is it possible to to tell ogr2ogr to create multiple ...
slinkp's user avatar
  • 711
28 votes
5 answers
58k views

Converting shapefiles to GeoJSON

I'm trying to convert shapefiles from the State of Texas Senate Districts website into a GeoJSON file for use with Google Maps API. I'm using QGIS to facilitate but I can't get the projection/...
user28781's user avatar
  • 281
27 votes
2 answers
65k views

Extracting intersection areas in R

I have two polygons. One contains fields(X,Y,Z) and the other contains soil types (A,B,C,D). I want to know what area of every field contains which type of soil. I tried the following: library(rgdal)...
user2386786's user avatar
27 votes
9 answers
20k views

How can I convert an excel file with x, y columns to a shapefile?

How can I convert an excel file with x, y columns to a point shapefile? There are some somewhat optional requirements in addition to the correct creation of a shapefile: Column types (as per Excel's ...
fmark's user avatar
  • 9,411
27 votes
4 answers
38k views

What is the difference between Coverage, Shapefiles and Geodatabases in ArcGIS?

I was wondering about the difference in spatial data storage methodology used by Coverages, Shapefiles and Geodatabases in ArcGIS. Coverage was the initial format, followed by Shape Files and now ...
Abhishek Potnis's user avatar
27 votes
1 answer
20k views

Selecting features by attributes using ogr2ogr?

I am writing a shapefile after some processing; however, in the final step I need to do some selection by attributes from the the shapefile. I am using the command in a shell with the aim of using it ...
user2757128's user avatar
27 votes
6 answers
36k views

Shapefile loader in pgAdmin 4

Recently I have updated my postgresql version. I have also upgraded pgAdmin from 3 to 4. But I was unable to load shapefile. I didn't find any plugin called shapefile loader. How can I get the ...
Devils Dream's user avatar
  • 3,217
27 votes
2 answers
30k views

Converting from Geography to Geometry data type in PostGIS?

I have a shapefile that has geography types. Can I convert it with a tool like shp2pgsql or is there a postgis function to do that?
Paco Valdez's user avatar
  • 1,378
27 votes
4 answers
14k views

How do you determine a shapefile's charset?

Is there a way to determine the charset used for a given shapefile?
Matthew Finlay's user avatar
27 votes
5 answers
33k views

Adding attribute field to existing Shapefile via Python without ArcGIS

I have a Python script that adds an attribute field to a Shapefile if doesn't exist. This is easy to do with ArcGIS (graphically or via Python), but I'm looking for something that doesn't depend on ...
Mike T's user avatar
  • 42.4k
26 votes
3 answers
35k views

Order of polygon vertices in general GIS: clockwise or counterclockwise [closed]

Two days ago I asked a question about the internal storing order for the vertices of a polygon in ESRI shapefiles. That question was answered (Are polygons stored clockwise or counterclockwise in a ...
jgpallero's user avatar
  • 759
26 votes
1 answer
25k views

Merging adjacent polygons in shapefile that has been split at tile boundaries?

I'm currently using building data from the Ordnance Survey Vectormap District and I've noticed that a lot of building polygons are split in 2 because of the way the OS split up the shapefile. This is ...
Robin Hawkes's user avatar
  • 1,035

1
2 3 4 5
117