Project

General

Profile

Feature #1047

API: Import geometries

Added by Stefan Eichert about 2 years ago. Updated 3 days ago.

Status:
Assigned
Priority:
Low
Category:
Data import/export
Target version:
Start date:
2019-07-31
Estimated time:

Description

In many cases geometries for places, features and stratigraphic units already exist as research data from various sources and could be used for the data input.
So far I imported them directly in the PostgreSQL PostGIS using sql commands.
It would be very very helpful to have the possibility to import them already in the edit view of our physical things.
Therefore I suggest to start with WKT and then extend this to .shp files in the future.
WKT could be achieved by inserting the string as text and creating the polygon then via PostGIS geometry from WKT
shp: https://gis.stackexchange.com/questions/41799/adding-shapefiles-to-postgis-database

+1 Berni

History

#1

Updated by Alexander Watzinger about 2 years ago

  • Target version set to 187
#2

Updated by Alexander Watzinger about 2 years ago

  • Status changed from New to Acknowledged
#3

Updated by Alexander Watzinger almost 2 years ago

  • Target version changed from 187 to 193
#4

Updated by Alexander Watzinger almost 2 years ago

  • Target version changed from 193 to 4.1.0

Moving this feature to 4.1.0 because we will release the major version 4.0.0 first and than see if this can be implemented with the new API.

#5

Updated by Alexander Watzinger over 1 year ago

  • Target version changed from 4.1.0 to 5.0.0
#6

Updated by Alexander Watzinger over 1 year ago

  • Category set to Backend
  • Target version changed from 5.0.0 to 5.2.0
#7

Updated by Alexander Watzinger over 1 year ago

  • Target version changed from 5.2.0 to Wishlist
#8

Updated by Bernhard Koschiček-Krombholz 12 months ago

  • Description updated (diff)
#9

Updated by Bernhard Koschiček-Krombholz 8 months ago

  • Target version changed from Wishlist to API
  • Category changed from Backend to API
  • Subject changed from Import geometries to API: Import geometries

Browsing through old issues, and found that. I will move this to the API section.

I will start with geojson, because they don't need extra packages, are human-readable, easy to manipulate and QGIS and ArcGIS can easily convert .shp files to geojson.

This has to be a cooperative with the UI, since Stefan wants it in the edit view.

In a first version, it should be possible to upload a geojson with several geometries (no Multi Geometries and no Z value) with a name field, which creates a new entry for each geometry.

Early additional features will be:
  • link to existing Place entity through id field
  • link to types through id if geojson import creates a new entity
  • create one entity with n geometries

Question to Stefan

WKT could be achieved by inserting the string as text and creating the polygon then via PostGIS geometry from WKT

This can actually be done in the SQL interface provided under /sql or? Can you send me an example from you of such a string?

#10

Updated by Bernhard Koschiček-Krombholz 8 months ago

  • Category changed from API to Data import/export
#11

Updated by Bernhard Koschiček-Krombholz 8 months ago

  • Assignee set to Bernhard Koschiček-Krombholz
#12

Updated by Alexander Watzinger 8 months ago

Just wanted to add it would be very useful to add many geometries in one go just in case this wasn't meant implicit already. What I mean is not just many geometries for one entry but also for multiple entities.
But first we should implement adding entities themselves.

#13

Updated by Bernhard Koschiček-Krombholz 8 months ago

I wrote already a script that does:
  • link to existing Place entity through id field
  • link to types through id if geojson import creates a new entity
  • create one entity with n geometries

with any amount of geometries coming from a geojson. Of course, it does only basic forms of data validation, but if the input data is fine, it works like a charm.

I will try to write specifications of such an import function until the meeting 28.01.21, so we can discuss this. The main format of data import will be json. Later we can add something like csv, excel and xml, because they are quite easy to convert to json.

#14

Updated by Alexander Watzinger 3 days ago

  • Status changed from Acknowledged to Assigned

Also available in: Atom PDF