Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [spatial-database]

Spatial database is a database that is optimized to store and query data that is related to objects in space, including points, lines and polygons.

0
votes
1answer
21 views

password authentication failed for user “ASUS”

I'm creating table in PostgreSQL using these commands: shp2pgsql -s 32632 watershed.shp watershed > watershed.sql psql -f watershed.sql cambridge psql -f watershed.sql cambridge But I had ...
1
vote
0answers
33 views

DBeaver spatial output window: Is it possible to sync/filter spatial query to map bounds?

While upgrading PostGRES/PostGIS from 9.x to 11.x, I have discovered DBeaver and so far I am pleased. Apparently it has some spatial integration, including the ability to visualize spatial data ...
0
votes
0answers
22 views

Google Earth like tool to direct query spatial data from an SQL database

I'm looking for a desktop reporting tool which allows me to query spatial SQL data via direct query. I'm looking for a simple application end user without any GIS knowledge can use. I've tested ...
1
vote
0answers
48 views

Can relation reference in QGIS and QField be used to fill stochastic matrices?

I am a novice GIS user and am just seeing the potential for relations in my work. A problem I've come across and would like a solution to it. I have two stochastic matrices (risk matrices) that ...
0
votes
1answer
46 views

SQL layer wont ORDER BY in CARTO VL

I have a dataset that shows the borehole yield for fractured aquifers in South Africa. Using the "yield_ls" column, my CARTO VL legend looks like this (notice how the 4th item should be the first). ...
1
vote
0answers
20 views

How to index spatial objects? [closed]

“R-tree is useful to store spatial objects such as restaurant locations”. I see this sentence a lot of time in internet but I haven't found the good explanation on this. Can anybody please elaborate ...
0
votes
2answers
45 views

Clarification on Oracle sdo_gtype

I need some clarification on oracle sdo_gtype 4402. I understand that sdo_gtype is codded as DLTT. D: Dimension L : linear reference T T: TT identifies the geometry type. It's clear to me that first 4 ...
3
votes
1answer
129 views

Accessing PostGIS data in QGIS?

I've created a two new PostgreSQL users; one that is supposed to have read-only privileges and another one that should have most privileges (admin-user). When I connect/log in to the new users in QGIS ...
1
vote
0answers
169 views

GeoDjango application using SpatiaLite database

I want to create a simple GeoDjango app with SpatiaLite database but I have this error at migrate: django.core.exceptions.ImproperlyConfigured: Unable to load the SpatiaLite library extensio`. ...
0
votes
1answer
35 views

Extracting and transposing a single record in db manager

This seems like a simple operation so apologies if I've missed an existing answer. What I need to do is extract single record (a client) from a database of clients (in Spatialite) and present the ...
0
votes
0answers
133 views

Does Redis geo have the capability for storing polygon?

I followed the example here and also here about geospatial support in Redis. I tried to add POINT features to my Redis dataset, and subsequently I can query POINT names within certain radius of a ...
1
vote
0answers
124 views

What's the most size-efficient spatial database [closed]

I'm configuring a tile server on Apache Mesos. From all the tutorials I've read, I gathered that PostgreSQL and PostGIS is widely used for this purpose. I learned that MongoDb and MySQL Server also ...
1
vote
2answers
155 views

PostgreSQL - only allow points to be added to the table (no polygons or lines)

I want to know if there is a way to only allow certain Geometry types to be added to a table in PostgreSQL. I have a tool that currently allows points, lines and polygons but would like to restrict ...
1
vote
2answers
384 views

Using SqlGeometry.MakeValid to get a counter-clockwise polygon in SQL Server

The data I've loaded from a shapefile into a geometry column in SQL Server (using NetTopologySuite) is not producing valid GeoJSON when I export it because it doesn't follow the right-hand rule. I ...
4
votes
0answers
668 views

When does WKT orientation matter for polygon and multipolygon in geography spatial (left/right hand rule, counter-clockwise, clockwise)

I've decide to use sql server on Azure for my gis database. I'll be dealing with spatial Geography not Geometry. While inserting some country boundaries using the spatial data in SQL Server, some ...
2
votes
1answer
129 views

How to extract values from multiple rasters and polygons for given coordinates

I have roughly 30 predictor variables in raster and two polygon shapefiles format that I am trying to extract values from for a given response variable coordinates. I have already done the following:...
0
votes
1answer
103 views

Copying raster to SQLite using GDAL?

I want to copy a raster file into SQLite database. Previously, I did the same with vector data like this: def store_vector_output(self, file_name, identifier): from osgeo import ogr drv = ogr....
0
votes
0answers
90 views

Cannot open a SpatiaLite connection using ogr in Python

I need to open SpatiaLite connection to copy data to the database. This is my code: from osgeo import ogr dsc_in = ogr.Open(file_name) if dsc_in is None: raise Exception("Reading data failed.") ...
1
vote
1answer
212 views

Nearest point on line from a point in PostGIS and its attribute value

Consider the following image; I have points (shown in blue circles) stored in my database with their geometry and an attribute value. Additionally, I have another table with User Points (yellow ...
12
votes
1answer
151 views

Is the ST_ prefix appropriate for functions not included in SQL/MM Part 3?

I was reading a thread on the geospatial extension for Presto in this Github issue, where a function, line_locate_point, was introduced. It was based off PostGIS's ST_LineLocatePoint function, which ...
0
votes
2answers
47 views

Add column to show intersection with another layer

I have a table containing a list of properties. I have a successful query to return only those that intersect another layer. However i want to return all the properties now and instead return a new ...
0
votes
1answer
404 views

MySQL GPS distance calculation is failing

MySQL 5.6 here. I'm storing GPS coordinates as MySQL Point types in my DB and am trying to build a query that takes a single GPS coordinate (consisting of latitude and longitude components) and ...
1
vote
1answer
216 views

Export spatial data from SQL Server to ESRI shapefile using OSGeo

i did a join between 2 tables departements2 which has all department with their id and geometry with BM_REGIONFR with id of department and region ( i have 5 region in each region many departement ) ...
1
vote
0answers
65 views

Layer length statistics in print composer QGIS

In a QGIS composer, I would like to add a text label with the calculation of % of length of the total layer with a specific feature value. My layer is composed of roads lines and I would like to ...
2
votes
1answer
324 views

Saving styles for all layers using PyQGIS - SLD, QML, databases

I wrote a script (for QGIS 3) that saves styles for all visible vector layers in QML and SLD files: import processing self=qgis.utils layers = self.iface.mapCanvas().layers() for layer in layers: ...
0
votes
1answer
43 views

At what point is the R-tree created?

Whats going on: I am working with postGIS and spatial datas. I am having trouble to fully understand the R-tree algorithm. Example query: In which town is point P located? My understanding so far ...
1
vote
0answers
573 views

What is the proper way to store geospatial data in SQL Server db table? [closed]

I am using OpenLayers at client side and the user is able to create new geometry points or feature and save it. All the new feature is stored in SQL server DB table. Each feature will have its own ...
1
vote
0answers
130 views

How to Unregister Replicas that have an invalid data-set information using ARCGIS REST APIs Version(10.2.1)

I am writing an application which will UnRegister replicas that are currently available. I managed to unregester new replicas which have the latest Server Url address stored in the DATASET_INFO field, ...
2
votes
1answer
242 views

Optimize intersection of polygons

I need to get the intersection of two polygons and both sides use the same dataset (titlenumberpolygon - UK National polygons). PostGIS is used in the analysis. First a spatial index was created ...
1
vote
2answers
107 views

Styles embedded in Spatialite database are lost while copying database

I have created a Spatialite database with several layers. I have customised the style for each layer and have saved the style as the default style in the database. All works fine when I connect to ...
2
votes
1answer
171 views

Merging multilane road into one lane

I have a road network file (openstreetmap exported file) that has various types of edges (freeway, highway, primary, residential, service, ...). Some of these edges have multiple lanes (parallel), so ...
3
votes
1answer
118 views

Organising PostGIS data within large spatial database? [closed]

I'm currently educating myself on spatial databases and have downloaded lots of open data from a regional authority. I know the technicalities on how to get that data into my new PostGIS database, ...
1
vote
1answer
150 views

Skipping projection errors in PostGIS

I have a PostGIS query that throws an error somewhere down the line: SELECT ST_Disjoint(ST_Transform(location, 26910),ST_Buffer(ST_Transform(ST_SetSRID(ST_MakePoint(-121.3991535, 37.7458),4326), ...
0
votes
1answer
61 views

How to query subdistrict with multilinestring

I use postgis database and I download subdistrict shapefile of thailand from: https://data.humdata.org/dataset/thailand-administrative-boundaries and I have my point latitude and longitude (13....
1
vote
0answers
40 views

Does ArcGIS Server allow the output data to be stored in a database? [closed]

There is a chapter in my bachelor thesis on database output storage support within various WPS implementations. In other words, I want to find out if the output data (data derived from processes ...
0
votes
1answer
339 views

Joining tables based on distance using SQL Server

I need to show the three closest hospitals to every house. I have a table of properties and a table of hospitals. Both are in MSSQL2012, have a geography column that is indexed and are in the same ...
-1
votes
1answer
172 views

ST_Covers returning false with PostgreSQL/PostGIS

I have two lon/lats that I've turned into geometry. I've tried having the column type being both text and geometry. I have a fence_geom and a user_geom. I am looking to test to see if the user is ...
2
votes
1answer
591 views

Add Geography Column to an existing table

I Have an existing table GPSPosition which has a coma seperated LatLong column. I have attempted to add a geography column using the query: alter table GPSPositions add geographyColumn as geography:...
0
votes
1answer
260 views

Setting a Grid inside a shapefile in r

I am trying to crate a grid inside a shapefile, something like this. However, I am unable to generate such grid. I was wondering if anyone has an idea on how to accomplish this. Here is my code - ...
1
vote
2answers
330 views

Join two SpatialPolygons keeping any polygons which overlap

The best way I can describe my problem is that I’m after a left inner join for two spatial objects??? As you can see below, I have two spatial objects: (1) State of California [in blue] and (2) Grid ...
2
votes
1answer
460 views

How do I decide what sort of spatial index to build for a SQL Server table with a Geometry column?

Let’s say an organization manages a lot of GIS data stored in Sql Server and leverages Esri software. To ensure that users can access the data with reasonable speed, I want to make sure the spatial ...
1
vote
1answer
424 views

lines of a SpatialLinesDataFrame corresponding to points

I have a spatial lines data frame which can be projected on to a map. The projection is defined as WGS84. I have a Spatial Points Data Frame which is also in the same location. How can I isolate the ...
2
votes
0answers
2k views

Clustering latitude longitude data based on distance

I have a large dataset of latitude and longitude. I want to cluster the data into groups based on distance such that the distance between two points in a cluster is not greater than a minimum ...
1
vote
1answer
130 views

sdo_aggr_union is not working

I have a table map_building_data and I create view all_incidents_unions CREATE OR REPLACE FORCE VIEW ALL_INCIDENTS_UNIONS ( ORA_GEOMETRY ) AS SELECT sdo_aggr_union (MDSYS.sdoaggrtype (ora_geometry,...
0
votes
3answers
905 views

Is it possible to export spatial data from database to shapefile without writing SQL manually?

Shapefile is being imported to Oracle DB. Is there a tool to export this spatial data as a shapefile without writing any SQL (like you have to do with SQL Developer and GeoRaptor)? EDIT: from all ...
2
votes
1answer
346 views

DBScan with Convexhull

I am new to GIS, I am using PostGIS(2.3). I have two problems I am not clear with Problem-1: I have list of locations(longitude, latitude, 4326), what is best/correct projection to use while ...
0
votes
1answer
73 views

Updating sdo_geometry?

I have a table NEW_TABLE ID and ORA_GEOMETRY where id = 1 then ORA_GEOMETRY = MDSYS.SDO_GEOMETRY(2003, 32638, null, MDSYS.SDO_ELEM_INFO_ARRAY(1, 1003, 1), MDSYS.SDO_ORDINATE_ARRAY(462897.8239, ...
2
votes
1answer
393 views

Create a runtime geodatabase in QGIS for an Android app

I need to generate a runtime geodatabase for map visualization on my android device. Back in the days we used ArcGIS with local file-geodatabases, where we were just able to export a runtime ...
0
votes
2answers
273 views

Download Solar Insolation Data from NASA in R

I need to get solar insolation data from different parts of the world. I have several latitude and longitude coordinates and I would like to get a mean solar insolation value across different years. ...
1
vote
0answers
111 views

Speeding up closest point query?

I'm using PostGIS/Tiger for a mapping solution. For a given longitude, latitude (derived when someone clicks on a point in my Google Map), I want to retrieve the closest point from my table. My table ...