Acronym for Structured Query Language. A syntax for retrieving and manipulating data from a relational database.
3
votes
1answer
222 views
Duplicate ObjectID in ArcSDE Table
After making a check in from an arcpad AXF file, i remark that there's duplicate object ID records , this Arcsde pgsql table is versioned and edited by Axf checkins and a .net engine application. the ...
17
votes
2answers
1k views
Acquiring ArcGIS-like speed in Postgis
I have been using Postgis 2.0 for 3/4 of a year now and while I really enjoy using it, excessive query processing time has rendered it basically unusable for my use case.
I tend to do heavy ...
3
votes
1answer
1k views
ArcGIS - Create a join based on multiple fields
I have two feature classes in a File Geodatabase that I would like to join based on multiple fields. I've searched this site and Google and all I have come up with was to use the Make Query Table ...
1
vote
0answers
77 views
How to find loops in a network
I am a new in this field and need help, how to code using SQL spatial a function that retrieve loops in a network.The input, flag: Geography and barrier: Geography and two spatial tables, first ...
0
votes
1answer
182 views
How to select multiple features using advanced search SQL in QGIS
I have a layer of planning units covering a large area (there are over 16000 PU's). Three of the columns in the attribute table hold information about which planning units were included in the ...
2
votes
1answer
157 views
Direct DBMS sql queries and ArcSDE geodatabase
i want to make updates from Arcobjects on several tables stored on a ArcSDE 10.1 versionned geodatabase based on Postgresql 9.0.5 , none of these update require spatial data , and making these updates ...
4
votes
3answers
902 views
Select features by attribute if in Python list
I believe this will amount to largely a sql syntax question. Essentially, I am trying to complete a select by attribute in Python but based on the query of whether an attribute is present in a list.
...
1
vote
1answer
196 views
Cordenadas 2d transformacion a postgis desde QGIS
This is a three-dimensional shape file, I checked in ARCGIS, where the shape attribute indicates POINT ZM,
This is the table
fid 0
shape* point ZM
atribut1 A
atribut2 B
ESTE ...
2
votes
0answers
181 views
Creating a model to run a complex query
I'm just a rookie when it comes to creating models in ArcGIS. I have two shapefiles from which I need to calculate an AVG and a MAX erosion rate for individual properties.
The two shapefiles are:
...
2
votes
1answer
108 views
Postgis nested query trouble
I am having difficulty writing a nested postgis query. I have a single table from which I need to create a view in PostgreSQL.
I have created the view with the following command
create view ...
2
votes
0answers
96 views
Select a distinct attribute with maximum shape area
I am trying to manipulate a large dataset containing a lot of sliver polygons resulting from an overlay operations. (The eliminate tool is very time consuming to generalize them.)
I identified the ...
4
votes
1answer
691 views
Performing Geoprocessing SQL Queries in QGIS from a PostGIS Database
This may be a dumb question, but is there way to run a PostGIS geoprocessing SQL query in QGIS? Specifically, I am thinking of running SQLs such as ST_Union, ST_Split etc etc.
I have tried the ...
4
votes
1answer
151 views
ogrinfo SQL GROUP BY Clause
Does ogrinfo support a GROUP BY clauses? I could not find any good documentation of all the SQL syntax features it supports.
I tried the following:
ogrinfo . -geom=no -sql 'SELECT lsad FROM ...
0
votes
0answers
107 views
How to find points, sort them based on closeness, and get 1-20, 21-40, etc. Efficiently using Myisam and mysql
Note: In this question I want actual mysql command that I should send. Not concept, and stuff.
This question is similar with how to find 20 closest points efficiently
However in that question I ...
4
votes
3answers
265 views
arcgis10 filter dataset
Using ArcGIS 10 SP-4
I have a large dataset of sites that needs to be filtered down to a usable size. There is an attribute for the site_ID and another one for the site_type. There are duplicate ...
1
vote
1answer
123 views
Python SQL connection causes crash in ArcMap
I have the following code which I have striped down to just included the part that is causing a crash in ArcMap.
import pymssql
# Connect to the Research db using Windows Integrated Authentication.
...
3
votes
1answer
179 views
How to update attribute values of points outside an area?
I have two datasets in PostGIS 1.5 (on Postgres 9.1) one of polygons and one of points.
I am hoping to create a SQL command that will select all of the points in a dataset that are not within of the ...
3
votes
1answer
183 views
SQLServer generating invalid WKT
I am a GIS novice using SQL 2008, with C# and the NetTopologySuite WKTReader type to work with some geometries.
I have some data which I have been able to save into the database but when I read back ...
2
votes
2answers
587 views
Convert RT90 into WGS84
Goal:
Gain WGS84 decimal to locate some cities in Google Map.
Problem:
I don't know how to convert the value of the RT90 coordinate system into WGS84 in SQL Server.
1
vote
0answers
84 views
Acceptable Reduce() amounts for google maps zoom levels?
I'm using SQL Server Spatial to return large polygons to Google Maps for display. Given that google maps has a zoom scale of 1 - 20, I would like to reduce my polygons (reduce function uses the ...
1
vote
2answers
237 views
Select points within a relative number range
I need to select points that have attributes that are within a relative number range of each other. For instance; given the following numbers: 95,705,139,65,537,266,525 and 188; I need to find all of ...
3
votes
1answer
416 views
ESRI File Geodatabase - Trying to use CURRENT TIME in Definition Query
Is it me, or are the date functions in the file geodatabase a total nightmare.
Anyway, I am trying to set up a fairly simple definition query that contains a subquery with a date comparison. My ...
1
vote
0answers
155 views
Add building height from xyz points in PostGIS
I have been trying to get this query right and just can' seem to.
I have a building polygon table with over 7 million polygons, indexed
I then have a grided height XYZ table with attribute 'height' ...
4
votes
2answers
2k views
ARCGIS 10 definition query to select the max value from a group
In ARCGIS 10 I am trying to do a Definition Query that will select the records that are the max values from a specific group.
Here is what I have tried in the Query Builder but I am getting an "the ...
2
votes
1answer
111 views
SQL Plus error using sdeversion
I'm new to SQL Plus and I have a question. I've created several versions of a feature class located on a SDE database. I want to use ArcSDE Administration Commands found here but I'm getting an error ...
0
votes
1answer
95 views
Postgis reorder mixed up linestring chunks / max_segment_length(linestring)?
I imported ~1000 paths from somewhere into my postgis database to a linestring field.
I had the problem that the paths were divided into chunks, and those chunks were mixed up in some cases.
Suppose ...
1
vote
1answer
75 views
Read height data from Meridian 2
I'm having difficulties reading the Gridded height data (OS Meridian 2). I'm loading with OSGB 1936 reference system but have trouble finding the lat/lon data for each point. i.e.I open the attribute ...
4
votes
2answers
432 views
Changing Buffer table geometry dynamically in PostGIS using plain SQL
I have two tables in PostGIS, a point and a point_buffer table. The point table has a buffer_distance field, with a default value say 200. Now I want to change the buffer table geometry whenever I ...
1
vote
0answers
183 views
Manifold 'Link drawing to query' - can I do this in QGIS?
Manifold GIS allows the creation of dynamic drawings linked to queries.
Unfortunately I do not have access to Manifold as my employer refuses to pay for it, so am currently investigating ...
1
vote
1answer
743 views
POSTGIS query of point feature. How to find nearest point to query location?
I am querying a point feature using a POSTGIS request fired in Javascript. The decoded URL looks like this and returns great results for polygon features.
...
1
vote
1answer
265 views
Creating a SQL query in the ArcGIS Explorer SDK
I am using the ArcGIS Explorer SDK and have run into an issue surrounding a query I would like to perform with SQL. I believe my query is built wrong or perhaps I am looking at the wrong fields. Would ...
0
votes
1answer
180 views
Running database operations against a stored GIS geometry
I'm using Quantum GIS and Postgres with the GIS extensions to store shapefiles that I'd like to run point in geometry and point in union geometries against. While it's easy to save and load the vector ...
0
votes
0answers
51 views
postgis minimum distance among many points [duplicate]
Possible Duplicate:
Nearest Neighbor calculation in PostGIS
Is there a way to achieve the following:
SELECT ST_AsText(a.geometry),
min(ST_Distance(ST_GeomFromText('POINT(10 20)'), ...
4
votes
2answers
3k views
How to convert MultiLinestring to Linestring?
I have a multiline string and want to convert it to a linestring in order to use some functions that only work with linestrings. I used ST_Dump() and got a collection of my geometries. If I merge them ...
7
votes
2answers
838 views
Intersecting a raster with a polygon using PostGIS - artefact error
I'm using PostGIS2.0 to do some raster/polygon intersections. I'm having difficulty understanding which operation I should use, and what the quickest way of performing this is. My problem is as ...
0
votes
1answer
134 views
Vertex point is returning None
I have this multilinestring that has 48 NPoints. When I execute ST_PointN(line,5) it returns none. And to continue on, it returns None for everything after index:2 up to index:48. This is how my line ...
4
votes
1answer
949 views
Registering SQL Spatial View in ArcSDE and updating Row_ID
I am having issues registering an inner join SQL view with a spatial column in ArcSDE. Any help would be much appreciated.
Here is the background info:
ArcSDE 10, SQL Server Enterprise 2008 R2, SQL ...
1
vote
1answer
325 views
Passing parameters to PostGIS SQL queries in Python: weird behaviour
The following code always goes to the except section and I do not understand why..Any help would be much appreciated.
l = None
c = conn.cursor()
try:
s = "SELECT ST_NPoints(ST_GeomFromText(%s))"
...
3
votes
2answers
507 views
Selecting points not snapped
I have a point layer and a polyline layer. I want to select all points in the point layer that are not snapped to a vertex in the polyline layer. How can I accomplish this? I'm using MapInfo and ...
1
vote
1answer
158 views
How to correctly use cursor.execute() with PostGIS?
I do not understand how the operator works some times...
Here is an example that works,
"SELECT ST_Distance(ST_GeomFromText('POINT(-3.16496271127842 ...
5
votes
2answers
414 views
How to fix pgRouting error “starting vertex not found”?
I've posted on here before about my battles with drivetime polygons and got some sensible suggestions back, so having Googled myself stupid over this I'm turning to you once again in the hope of a ...
4
votes
1answer
1k views
Good place to get Country, State, City, and Zipcode information?
I'd like to populate a database with common location information.
I'm not entirely certain that addresses across the globe have similar or even the same entities as the Country, State, City, and ...
3
votes
1answer
535 views
ArcGIS Select Analysis using Unique Values from Field
I am trying to create separate shapefile using Select analysis with ArcPy by doing an SQL query to create them based on a unique value from the field. I want to create a list of the unique values in ...
3
votes
1answer
1k views
Arcpy cursors, WHERE clauses, and date/time fields
I'm having trouble making a selection of rows that meet certain date criteria using my arcpy.UpdateCursor(). I need to update records in a field in a geodatabase table with an ascending value based on ...
3
votes
2answers
460 views
What is the best approach to using IQueryFilter.WhereClause in ArcObjects?
What is your preferred / best approach to using IQueryFilter.WhereClause statements in ArcObjects (e.g. when selecting features by attributes)?
You need to check the source type (shapefile / personal ...
6
votes
2answers
624 views
Join intersecting lines with PostGIS
This is something that I'm almost ashamed to ask but I can't seem to get it to work for the life of me.
I have a road layer with segments, each segment has a Road ID and a segment type.
I would like ...
0
votes
1answer
85 views
How to query distict row with the same label from different linestring with multiple segment?
I have a multilinestring street table in postgis with two columns: label and prefix.
This table has 2 different roads with the same name and each road contains multiple segments.
Roads were splitted ...
11
votes
1answer
407 views
Nearest Neighbor Grouped Selection in QGIS
OK - so I have an interesting problem I am trying to solve. I have a list containing over 100,000 points in lat/long format which I have imported into qgis.
Now, what I am trying to do here is group ...
0
votes
2answers
570 views
Correct SQL statement in FME?
I am trying to write SQL statement in WHERE Clause FME in Navigator but it does not work.
WHERE Clause:
NAME IN SELECT CONCAT(''$(',SELECT REPLACE ('Roman Ann Jack',' ',','),')'')
This sql code ...
5
votes
1answer
1k views
How to find nearest neighbors between two tables with point locations in SpatiaLite?
I have started playing with SpatiaLite today and already stumbled upon a problem.
For each point location stored in tableOne I would like to select one, nearest (linear distance) point from tableTwo.
...


