problem exporting data with ogr2ogr

i wanted to export a geojson file from my table „GeoData4326“ (with quotes) postgis postgres database with ogr2ogr

ogr2ogr -f „GeoJSON“ export.json PG:“host=localhost dbname=mydb user=myuser password=12341234 „\“GeoData4326\““

i got the following error:

ERROR 1: No field definitions found for ‚“GeoData4326″‚, is it a table?
FAILURE: Couldn’t fetch requested layer ‚“GeoData4326″‚!

my workaround is: create a view to this table without quotes on the name:

create or replace view GeoData4326 as SELECT * FROM „GeoData4326“;

now the export should work.

problems solved with bittorrent sync

bittorrent sync did not sync folders and the peers online were zero.

i tried to delete and reconnect folders and .sync files and folder but the only way was to reinstall all btsync-applications (os x, ios, raspberrypi).

on os x you have to end automatic start at system start and then kill the processes „Sync Finder Extension“ & „CMFSyncAgent“. search them with ps -e | grep sync and then kill them with the activity monitor.

ETRS89 ETRS-LAEA EPSG 3035

qgis2leaf plugin for qgis

this plugin creates a nice webpage out of your layer in QGIS within some seconds!

after installing the plugin qgis2leaf (and with a prepared maps with some vector-layers) click the new button „Exports a QGIS Projetc…“

  • Press „Get Layer“. All layers are loaded to the list-box
  • Select all layers you want to display in your webpage
  • Click all checkboxes you need for your webpage
    • Create cluster clusters all points with the number of points per cluster
  • Select one or more basemaps. If you want to change your basemap to a custom map (eg basemap.at) use this code for basemap_0
var basemap_0 = L.tileLayer('https://{s}.wien.gv.at/basemap/bmapgrau/normal/google3857/{z}/{y}/{x}.png', {
 attribution: additional_attrib + 'Map tiles: <a href="http://www.basemap.at" target="_blank">www.basemap.at</a>, <a href="http://creativecommons.org/licenses/by/3.0/at/deed.de" target="_blank">CC-BY 3.0</a>',
 subdomains: ["maps","maps1", "maps2", "maps3"],});
 ; 

// at the bottom of the html replace the naming of the basemap_0
 'basemap.at': basemap_0,
  • After pressing OK your browser starts with your map. Every OK-Click created a new folder with date and time inside your project folder.

QGIS import and export GPX

import is simple – just open the gpx-file with double click in the qgis-browser

export (lines)

  • right-click on the layer
  • save as…
    • Format: GPS eXchange Format [GPX]
    • Save as …
    • CRS: Selected CRS (coordinate reference system)
    • (do not „Add saved file to map“)
    • OK

export (points)

if you want to export points to GPX and get the following error – welcome🙂

Export to vector file failed.
Error: creation of layer failed (OGR error:Geometry type of `Multi Point' not supported in GPX.)

i found this bug-fix and my workaround is to use the following script from the toolbox (menu Processing – Toolbox (on the bottom „Advanced Interface“))

  • GDAL/OGR – OGR Conversion – Conversion format

i added these additional commands to „creation options“:

GPX_USE_EXTENSIONS=YES -explodecollections
processing.runalg("gdalogr:convertformat","/Users/me/QGIS/test.shp",16,"-dsco GPX_USE_EXTENSIONS=YES -explodecollections","/Users/me/QGIS/test.gpx")

export the gpx file as a script via python run the following in your python-console

import processing
processing.runalg("gdalogr:convertformat","/Users/me/QGIS/test.shp",16,"-dsco GPX_USE_EXTENSIONS=YES -explodecollections","/Users/me/QGIS/test.gpx")

.