22 votes
Accepted

What is the best hack for importing large datasets into PostGIS?

I made a test for you: PostgreSQL 9.3 PostGIS 2.1 Windows 7 i7 3770@3.4 GHz processor GDAL 2.0-dev 64-bit shapefile of 1.14 million polygons, file size 748 MB Ogr2ogr command: ogr2ogr -f ...
user avatar
  • 51.5k
17 votes
Accepted

How to refresh the attribute table of a layer after editing the table in the DB-Manager?

Short and sweet: Install changeDataSource plugin. Right-click on the layer in the Layers Panel and select Change vector datasource. In the dialog box that appears, just hit OK without changing any of ...
user avatar
16 votes
Accepted

ST_Transform doesn't work in PostgreSQL

select st_asgeojson(st_transform(ST_SetSRID(geom, XXXX), 4326)) AS geojson FROM ptable where level_1='Built Up' Try setting SRID beforehand by replacing XXXX with the code of your SRID.
user avatar
14 votes

How to convert a complex project of shapefiles to a SpatiaLite database?

It is definitely possible to pull all the layers into one database, although in a multiuser environment, this will be best if most users will only be reading (not editing) the data. The easiest way to ...
user avatar
13 votes
Accepted

Why use a database when you can have all of your data in javascript/openlayers?

Why use a database? Because it's not necessarily the case, especially with larger datasets, that you can expect to be able to push the entire thing to the client. If you're talking thousands of ...
user avatar
12 votes

What is the best hack for importing large datasets into PostGIS?

After the suggestions of user30184, Paul Ramsey and my own experiments. I decided to answer this question. I failed to mention in this question that I am importing data to a remote server. (although ...
user avatar
11 votes

Adding a GIS feature to existing database entry with QGIS

Figured this out! (also asked here) A record in a spatial table (Shapefile, PostGIS, Spatialite) that has no geometry can have geometry added by adding a 'part' to the feature using the advanced ...
user avatar
10 votes
Accepted

How to load a data table as a 'vector layer' using PyQGIS?

The following snippet works for me: uri = "file:///C:/testdata/somecsv.csv?delimiter=%s" % (";") lyr = QgsVectorLayer(uri, 'New CSV','delimitedtext') QgsMapLayerRegistry.instance().addMapLayer(lyr) ...
user avatar
  • 6,209
7 votes

How to display special German characters "ÄÜÖß" in a map?

In newer versions of QGIS you can right click the layer and select properties. In the first tab there is a section about layer information with the options for data source encoding. You can select UTF-...
user avatar
  • 1,579
7 votes

Is there any geocoding for better international support?

Finally I found the service best shoot my need, Here MAP API. They support mulitiple language and has good zh-hant/zh-hans matching; eventhough, they don't have compelete translate, but well matched, ...
user avatar
6 votes

How Oracle is related with GIS (Professional wise)

Oracle DBMS is is capable of storing spatial data either through custom formats (like Esri) or native (Oracle Spatial). This means it is worth learning for GIS Analyst because you will be able to ...
user avatar
6 votes
Accepted

How is a database related to a .mxd file?

An .mxd file specifies one particular way of rendering some data. The .mxd file references your data (by file name, by IP address, by URL, etc, depending on the data). But it does not contain the ...
user avatar
  • 1,758
6 votes
Accepted

Openlayers 3 GeoJson save and load

Regarding your code sample, there is really simple bug. I believe it's so obvious there is no need for further explanation; correct code would be: function getfeatures(){ var writer = new ol....
user avatar
  • 2,751
6 votes
Accepted

PostGis and datatypes WKT

The types geometry and geography are PostGIS data types, whereas point, line, path, etc. are native PostgreSQL data types. The native types offer very little functionality compared to the PostGIS ...
user avatar
  • 12.4k
6 votes
Accepted

PostGIS update column with selected

If you want to copy the geometry, you would add a new geometry column then copy the selected records. Assuming your data is using SRID 4326: ALTER TABLE myTable ADD COLUMN geom_point geometry(point,...
user avatar
  • 34.4k
6 votes

Reasons to NOT make my database into a PostGIS database?

All PostGIS types and functions are optional; if you do not use them, you will not notice them. You can simply switch it on and off with CREATE EXTENSION postgis; and DROP EXTENSION postgis;, so it is ...
user avatar
  • 1,729
6 votes
Accepted

Geometry data type Binary storage description

WKB presentation is defined in the OGC standards for Simple Feature Access https://www.ogc.org/standards/sfa. The details are in the document https://portal.ogc.org/files/?artifact_id=25355, Chapter 8....
user avatar
  • 51.5k
5 votes

What are the Pros and Cons of hstore data type in postgis?

Pros: It's a high performance and flexible key/value that can be indexed and queried. I have a complex schemaless web GIS that uses an HStore column for storing the features properties. Cons: Most ...
user avatar
  • 123
5 votes

Pulling CSV file directly from website into QGIS?

You could use an OGR Virtual Format. This link has a section called "Reading CSV containing spatial information" which shows how to create a VRT file that reads a CSV file with a lat/lon column. This ...
user avatar
5 votes

Converting Date field to string using ArcGIS for Desktop?

Arcpy has a built-in function to do this kind of conversion: Convert Time Field. It's mentioned in the first ArcGIS Help link in your question. It can take an ArcGIS date field and convert it to ...
user avatar
  • 12k
5 votes

How to load a data table as a 'vector layer' using PyQGIS?

Wow. Way simpler than I expected. Should not have supposed that 'ogr' wouldn't be able. someTableLayer = QgsVectorLayer(ministryOf.csv, 'sillyWalks', 'ogr') QgsMapLayerRegistry.instance()....
user avatar
  • 821
5 votes
Accepted

Linking file geodatabase and ArcSDE?

You mention you are using a server, are you using ArcSDE? if so then you want to set up versioning with your parent being your main GDB and the child being what your crews are editing on in the field....
user avatar
  • 3,812
5 votes
Accepted

Download OpenTopoMap bulk data

You mean "OpenTopoMap tiles", not "data". You can render your own with their open-source style from https://github.com/der-stefan/OpenTopoMap That would be the nicest and most independent way. You ...
user avatar
  • 8,163
5 votes
Accepted

Healthy number of tables in PostgreSQL schema?

The way you structure your data should typically reflect the way you intend to use it. If it’s the backend of an application and you need it to store transactional data, you would expect large ...
user avatar
5 votes
Accepted

Can I store raster data in a spatialite database (in QGIS)?

Try using a geopackage format. In geopackage you can store vector/raster layers, symbology and the same qgis project (from: project => Save to...)
user avatar
5 votes
Accepted

Extract data from a WMS with database

The whole point of a WMS service (or really, any service) is to hide specifics of the underlying database to users, so you only have to deal with a generic WMS interface rather than something database ...
user avatar
  • 4,164
4 votes

POI database of tourist attractions, or POI database with popularity index

Have you tried Geonames? They keep a global database of POIs. I took a quick glance at it and was able to download the most recent dump as a .txt and then opened in QGIS as a tab delineated file. ...
user avatar
  • 1,377
4 votes
Accepted

Cannot convert dms to dd in Excel 2007 using VBA code

Are the longitude and latitude values in separate fields? Because the Convert_Decimal function requires a single value. After trying this myself, I think you were trying to convert the DMS values to ...
user avatar
  • 18.2k
4 votes
Accepted

How to transfer layer data from OpenLayers to PostGIS database or QGIS?

You can use the write function of the OpenLayers.Format.GeoJSON to generate (Geo)JSON directly. The input is either an OpenLayers geometry, feature or feature vector, so the returned JSON, will either ...
user avatar
  • 13.2k
4 votes

How do I remove username / password from an ArcGIS mxd?

This has been partially answered in other posts: Remove username and password from saved arcgis layer (.lyr) files?, Changing workspace path of query layer using ArcPy? and Is it possible to set data ...
user avatar
  • 3,401

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