Closed knutole closed 9 years ago
fileUuid
fileUuid
1GB Shapefile import: 210 seconds = 3,5 mins.
Import with GiST
indexing by shp2psql
: 1GB, 234.791ms
Import w/o GiST
indexing by shp2psql
: 1GB, 213.432ms (21s less)
Creating GiST
manually with CREATE INDEX turkey_data_3_geom_gist ON turkey_data_3 USING GIST (geom);
30.247.354 ms. (Not much to gain by creating index later.)
gdalinfo --formats
VRT (rw+v): Virtual Raster
GTiff (rw+vs): GeoTIFF
NITF (rw+vs): National Imagery Transmission Format
RPFTOC (rovs): Raster Product Format TOC format
ECRGTOC (rovs): ECRG TOC format
HFA (rw+v): Erdas Imagine Images (.img)
SAR_CEOS (rov): CEOS SAR Image
CEOS (rov): CEOS Image
JAXAPALSAR (rov): JAXA PALSAR Product Reader (Level 1.1/1.5)
GFF (rov): Ground-based SAR Applications Testbed File Format (.gff)
ELAS (rw+v): ELAS
AIG (rov): Arc/Info Binary Grid
AAIGrid (rwv): Arc/Info ASCII Grid
GRASSASCIIGrid (rov): GRASS ASCII Grid
SDTS (rov): SDTS Raster
DTED (rwv): DTED Elevation Raster
PNG (rwv): Portable Network Graphics
GTA (rwv): Generic Tagged Arrays (.gta)
JPEG (rwv): JPEG JFIF
MEM (rw+): In Memory Raster
JDEM (rov): Japanese DEM (.mem)
GIF (rwv): Graphics Interchange Format (.gif)
BIGGIF (rov): Graphics Interchange Format (.gif)
ESAT (rov): Envisat Image Format
BSB (rov): Maptech BSB Nautical Charts
XPM (rwv): X11 PixMap Format
BMP (rw+v): MS Windows Device Independent Bitmap
DIMAP (rov): SPOT DIMAP
AirSAR (ro): AirSAR Polarimetric Image
RS2 (ros): RadarSat 2 XML Product
PCIDSK (rw+v): PCIDSK Database File
PCRaster (rw): PCRaster Raster File
ILWIS (rw+v): ILWIS Raster Map
SGI (rw+): SGI Image File Format 1.0
SRTMHGT (rwv): SRTMHGT File Format
Leveller (rw+): Leveller heightfield
Terragen (rw+): Terragen heightfield
GMT (rw): GMT NetCDF Grid Format
netCDF (rw+s): Network Common Data Format
HDF4 (ros): Hierarchical Data Format Release 4
HDF4Image (rw+): HDF4 Dataset
ISIS3 (rov): USGS Astrogeology ISIS cube (Version 3)
ISIS2 (rw+v): USGS Astrogeology ISIS cube (Version 2)
PDS (rov): NASA Planetary Data System
TIL (rov): EarthWatch .TIL
ERS (rw+v): ERMapper .ers Labelled
ECW (rw): ERDAS Compressed Wavelets (SDK 3.x)
JP2ECW (rw+v): ERDAS JPEG2000 (SDK 3.x)
JP2OpenJPEG (rwv): JPEG-2000 driver based on OpenJPEG library
L1B (rovs): NOAA Polar Orbiter Level 1b Data Set
FIT (rwv): FIT Image
GRIB (rov): GRIdded Binary (.grb)
MrSID (rov): Multi-resolution Seamless Image Database (MrSID)
JP2MrSID (rov): MrSID JPEG2000
JPEG2000 (rwv): JPEG-2000 part 1 (ISO/IEC 15444-1)
MG4Lidar (ro): MrSID Generation 4 / Lidar (.sid)
RMF (rw+v): Raster Matrix Format
WCS (rovs): OGC Web Coverage Service
WMS (rwvs): OGC Web Map Service
MSGN (ro): EUMETSAT Archive native (.nat)
RST (rw+v): Idrisi Raster A.1
INGR (rw+v): Intergraph Raster
GSAG (rwv): Golden Software ASCII Grid (.grd)
GSBG (rw+v): Golden Software Binary Grid (.grd)
GS7BG (rw+v): Golden Software 7 Binary Grid (.grd)
COSAR (ro): COSAR Annotated Binary Matrix (TerraSAR-X)
TSX (rov): TerraSAR-X Product
COASP (ro): DRDC COASP SAR Processor Raster
R (rwv): R Object Data Store
MAP (rov): OziExplorer .MAP
PNM (rw+v): Portable Pixmap Format (netpbm)
DOQ1 (rov): USGS DOQ (Old Style)
DOQ2 (rov): USGS DOQ (New Style)
ENVI (rw+v): ENVI .hdr Labelled
EHdr (rw+v): ESRI .hdr Labelled
GenBin (rov): Generic Binary (.hdr Labelled)
PAux (rw+): PCI .aux Labelled
MFF (rw+): Vexcel MFF Raster
MFF2 (rw+): Vexcel MFF2 (HKV) Raster
FujiBAS (ro): Fuji BAS Scanner Image
GSC (rov): GSC Geogrid
FAST (rov): EOSAT FAST Format
BT (rw+v): VTP .bt (Binary Terrain) 1.3 Format
LAN (rw+v): Erdas .LAN/.GIS
CPG (ro): Convair PolGASP
IDA (rw+): Image Data and Analysis
NDF (rov): NLAPS Data Format
EIR (rov): Erdas Imagine Raw
DIPEx (rov): DIPEx
LCP (rwv): FARSITE v.4 Landscape File (.lcp)
GTX (rw+v): NOAA Vertical Datum .GTX
LOSLAS (rov): NADCON .los/.las Datum Grid Shift
NTv2 (rw+vs): NTv2 Datum Grid Shift
CTable2 (rw+v): CTable2 Datum Grid Shift
ACE2 (rov): ACE2
SNODAS (rov): Snow Data Assimilation System
KRO (rw+v): KOLOR Raw
ARG (rwv): Azavea Raster Grid format
RIK (ro): Swedish Grid RIK (.rik)
USGSDEM (rwv): USGS Optional ASCII DEM (and CDED)
GXF (ro): GeoSoft Grid Exchange Format
HTTP (ro): HTTP Fetching Wrapper
BAG (ro): Bathymetry Attributed Grid
HDF5 (ros): Hierarchical Data Format Release 5
HDF5Image (ro): HDF5 Dataset
NWT_GRD (rov): Northwood Numeric Grid Format .grd/.tab
NWT_GRC (rov): Northwood Classified Grid Format .grc/.tab
ADRG (rw+vs): ARC Digitized Raster Graphics
SRP (rovs): Standard Raster Product (ASRP/USRP)
BLX (rw): Magellan topo (.blx)
Rasterlite (rws): Rasterlite
EPSILON (rwv): Epsilon wavelets
PostGISRaster (rws): PostGIS Raster driver
SAGA (rw+v): SAGA GIS Binary Grid (.sdat)
KMLSUPEROVERLAY (rwv): Kml Super Overlay
XYZ (rwv): ASCII Gridded XYZ
HF2 (rwv): HF2/HFZ heightfield raster
PDF (rwvs): Geospatial PDF
OZI (rov): OziExplorer Image File
CTG (rov): USGS LULC Composite Theme Grid
E00GRID (rov): Arc/Info Export E00 GRID
WEBP (rwv): WEBP
ZMap (rwv): ZMap Plus Grid
NGSGEOID (rov): NOAA NGS Geoid Height Grids
MBTiles (rov): MBTiles
IRIS (rov): IRIS data (.PPI, .CAPPi etc)
Vector:
ogr2ogr --formats
-> "ESRI Shapefile" (read/write)
-> "MapInfo File" (read/write)
-> "UK .NTF" (readonly)
-> "SDTS" (readonly)
-> "TIGER" (read/write)
-> "S57" (read/write)
-> "DGN" (read/write)
-> "VRT" (readonly)
-> "REC" (readonly)
-> "Memory" (read/write)
-> "BNA" (read/write)
-> "CSV" (read/write)
-> "NAS" (readonly)
-> "GML" (read/write)
-> "GPX" (read/write)
-> "LIBKML" (read/write)
-> "KML" (read/write)
-> "GeoJSON" (read/write)
-> "Interlis 1" (read/write)
-> "Interlis 2" (read/write)
-> "GMT" (read/write)
-> "GPKG" (read/write)
-> "SQLite" (read/write)
-> "ODBC" (read/write)
-> "WAsP" (read/write)
-> "MDB" (readonly)
-> "PGeo" (readonly)
-> "MSSQLSpatial" (read/write)
-> "PostgreSQL" (read/write)
-> "MySQL" (read/write)
-> "PCIDSK" (read/write)
-> "OpenFileGDB" (readonly)
-> "FileGDB" (read/write)
-> "XPlane" (readonly)
-> "AVCBin" (readonly)
-> "AVCE00" (readonly)
-> "DXF" (read/write)
-> "Geoconcept" (read/write)
-> "GeoRSS" (read/write)
-> "GPSTrackMaker" (read/write)
-> "VFK" (readonly)
-> "PGDump" (read/write)
-> "OSM" (readonly)
-> "GPSBabel" (read/write)
-> "SUA" (readonly)
-> "OpenAir" (readonly)
-> "PDS" (readonly)
-> "WFS" (readonly)
-> "HTF" (readonly)
-> "AeronavFAA" (readonly)
-> "Geomedia" (readonly)
-> "EDIGEO" (readonly)
-> "GFT" (read/write)
-> "GME" (read/write)
-> "SVG" (readonly)
-> "CouchDB" (read/write)
-> "Idrisi" (readonly)
-> "ARCGEN" (readonly)
-> "SEGUKOOA" (readonly)
-> "SEGY" (readonly)
-> "XLS" (readonly)
-> "ODS" (read/write)
-> "XLSX" (read/write)
-> "ElasticSearch" (read/write)
-> "PDF" (read/write)
-> "Walk" (readonly)
-> "CartoDB" (readonly)
-> "SXF" (readonly)
.
in names of uploaded files
Steps for setting up PostGIS filesystem
1. Docker PostGIS database
Dockerfile
), this is a good Dockerfile.data container
for PostGIS, so all data is stored in a pluggable data container.docker build
docker-compose.yml
docker-systemapic composition.2. Robust Uploader
data
uploads andimage/doc/pdf
uploads, and separate flows in client.PostGIS database
for each user, andtable
for each data file.zip
,tar
archivesaccess_token
based authenicationfile
model objects./api/data/upload
and/api/data/upload/chunked
.Resumable (later)
systemapic.js
client, notify in other way with other clients (perhaps do a GET request to an endpoint). Can also check.zip
files for content by reading last chunk.3. Error checks
4. PostGIS API Endpoints
See #153 and #151
Features
All requests to
/api/db/*
are proxied topile
. All export of postgis data (ie. tiles, geojson, files, tables) go frompile
, incl. manipulating of data, etc.SQL queries
on dataSQL
queriesEndpoints,
pile
:All requests must contain
access_token
, either asbody
in POST requests, orquery param
in GET requests./api/db/getData
: get postgis data represented as a file or table.Method: GET
Options:
layerUuid
, desiredformat
(eg. Shapefile, GeoJSON, table)Returns: A file.
/api/db/vector
: get a vector tile from postgisMethod: GET
Options:
layerUuid
,z
,x
,y
.Returns: A vector tile (
.pbf
)/api/db/raster
: get a raster tile from postgisMethod: GET
Options:
layerUuid
,z
,x
,y
.Returns: A raster tile (
.png
)/api/db/createLayer
: create a layer from postgis dataMethod: POST
Options:
layerJSON
see #151Returns: A
layerUuid
/api/db/getLayer
: get stored layer from layerUuidMethod: GET
Options:
layerUuid
Returns: A layer-object
Endpoints,
wu
:/api/file/get
: get a file object from afileUuid
4. File system
For normal files (images, docs, etc.), we'll use simple files. For data based files (geodata), we'll import to PostGIS.
table
) in PostGIS is represented in the MongoDBfile
model.layer
model.database
in PostGIS for all newuser
's.References: