Acronym for Structured Query Language. A syntax for retrieving and manipulating data from a relational database.
2
votes
0answers
66 views
Problem with SPIT (error while importing layers to POSTGIS)
I was attempting to import a polyline roads layer into postgis, using both SPIT in QGIS 1.7 and postGIS GUI for this purpose. I have received errors through both processes as described here:
SPIT
...
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
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 ...
1
vote
1answer
131 views
What are FLOOR and CEILIING in PostGIS designated for?
Just a short question to lighten up my understanding of some PostGIS-code:
Regarding the creation of user-defined grids I often find the expressions CEILING and FLOOR. Like in this non-representative ...
1
vote
1answer
54 views
Why does this SQL syntax produce empty feature class with ArcGIS Select_analysis?
I'm working on a script that involves an arcpy.select_analysis function. The problem I have is that when I run the script it produces an empty file. I've verified that the whole thing works when in ...
1
vote
1answer
52 views
How to get routes in the database that intersects circle?
I have routes (linestrings) recorded in the database. I want to create a query which returns the routes that have some commonality with a circle whose center and radius are passed as parameter.
I ...
1
vote
2answers
405 views
Error adding data to Geodjango database: parse error… within geometry
I'm trying to insert some values into a Geodjango database, but getting errors. This is the table:
class Place(models.Model):
placeid = models.IntegerField(primary_key=True)
structidx = ...
1
vote
1answer
120 views
Why is my PostGIS transformation not working?
I am using a PostGIS query to find the intersection of two streets, and then transform the results into lat/lon. The street database's current SRID is 6856, a projection I added to PostGIS myself; and ...
1
vote
2answers
166 views
How to find the center point of MULTILINESTRING?
How to find the center point of MULTILINESTRING, which lies on the multiline?
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 ...
1
vote
4answers
98 views
Get vector features inside a specific extent
The problem:
I have a very large vector layer with many features and a much smaller raster layer in a defined region. I want to get only those vector features which are within the raster layers ...
1
vote
1answer
48 views
How to share *.sql files between ArcGIS and MapInfo?
In Denmark many municipalities have the same provider of public data. These data are pushed to a local database – often a SQL Server.
The DBMS layout is the same for all municipalities.
When I create ...
1
vote
1answer
132 views
Should I query the tab/shp file or SQL (mapserver or geoserver)?
I have tab files (or shp) with information like residents , buildings etc...
I need to be able to click a point in web map and query all data that fall in certain radius.
I didn't decide yet which WMS ...
1
vote
2answers
240 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 ...
1
vote
1answer
327 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))"
...
1
vote
2answers
485 views
ArcObjects table views or sqlite3 in Python?
Given a larger csv (1000+ points) with attributes, I need to do both attrbute and spatial queries on the data. Would it be faster to read the points into an xy feature class, and do the spatial and ...
1
vote
1answer
36 views
How to get polygons from PostGIS table to PHP array best?
Currently I fetch polygons from a database table using ST_AsText(). The results are in text format, like the following.
POLYGON((84 104,212 48,321 122,243 179,275 238,131 240,84 104))
I am not ...
1
vote
2answers
103 views
Plotting large numbers of objects on a chart using R and WKT format
I am retrieving thousands of geometry lines in WKT format from a Microsoft SQL Server database. I would like to plot all of those lines in one map, but I am having some difficulty with the code. How ...
1
vote
1answer
42 views
SQL Command to convert pgRouting result to GeoJSON
My goal is to produce a Web UI for pgRouting using this tutorial. I have already imported my data from an OSM pBF to PostGIS using osm2po. Using the pgRoutingLayer plugin for QGIS, I was able to ...
1
vote
1answer
134 views
run sql on Qgis
I want to do simple demo to our manager with quantum gis. i have buildings from my city with wgs84 projection on postgre sql database and also have non gis table which have who leaves this buildings ...
1
vote
2answers
389 views
How to offset point perpendicular to line direction in PostGIS
I have a postgis table of points, that are sitting on road centerlines (I've linear referenced them). And the second table with road centerlines themselves.
The point table also has a field roadid and ...
1
vote
1answer
200 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 ...
1
vote
1answer
749 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 ...
1
vote
1answer
415 views
How to extract data from a POINT column in PostGIS using JAVA (jdbc)
How do you get a value from a column which has a point data type.
I've just switched over from MySQL to PostGIS. I have a column which is called point and is of type Point.
I want to get that value ...
1
vote
0answers
32 views
Geoserver WMST Date Format
There is table in SLQ-Server 2008 R2.
In this table i have date column with date format like this 2006-09-08 14:39:41.000. Now i make View from this table on Geoserver side but do nothing wiht date ...
1
vote
1answer
39 views
GDAL SQL syntax to add field an put values
I try to make a new field in my attribute table and put in values from another field after converting from character to integer but can't get the right syntax. I run this as shell-script in MSYS.
cd ...
1
vote
1answer
53 views
arcpy: can I use SelectLayerByAttribute to compare fields from joined tables?
I can't figure out the syntax to select table records where one field's value exceeds that of another. The fields are from a pair of table views connected w/AddJoin(). One view is of a fgdb table and ...
1
vote
1answer
77 views
Raster as Attribute Field Error
I'm using Arc 10.1. I am creating a parcel inventory where I would like to have a photo of the property attached as an attribute and view-able with an HTML popup. I have a polygon feature class built ...
1
vote
0answers
76 views
PostGIS Better ST_Intersects Query
I am currently using the following queries to return all features that intersect a large and complex polygon. I initially tried to use a single ST_Intersect query but because the number of features it ...
1
vote
1answer
56 views
PROBLEM SQL SERVER UNION of geography feature : FULLGLOBE result
I have some trouble with sql server 2012.
I store coordinates of french cities in my database as geography object (with ESRI 4326) and i want to make the UNION of some cities.
I have in result ...
1
vote
0answers
102 views
Function for Selecting Points in a Polygon
I've been banging on this for a few hours, but since I'm relatively new to PostgreSQL and PostGIS, I can't find the solution. I'm trying to create a stored procedure (function) which will return all ...
1
vote
0answers
30 views
How do I prevent Arcmap from verifying SQL expressions when using a plugin dataset?
I've written a plugin workspace for ArcGIS.
I'm able to compose a where clause containing syntax that my implementation of IPluginDatasetHelper understands, assign it to IQueryFilter.Whereclause, and ...
1
vote
0answers
123 views
SELECT DISTINCT from table in Geoserver SQL view [closed]
The postgis table I have has the following columns,
id | name | style_id | unique_id | time_stamp | the_geom(polygon)
and logically the unique constraint (not currently imposed in the db) lies with ...
1
vote
0answers
39 views
given sets of vehicle passing on each edge, how to get most used vehicle to avoid transition?
I have two tables: one, the resulting table from converting osm.xml via osm2po so I can use pgRouting, and another one that contains information on what edges each public vehicle passes through ...
1
vote
0answers
183 views
How to handle postgresql/postgis geometry type errors in a function?
I have created the following function in PL/SQL to make a polygon from a set of linestrings:
CREATE OR REPLACE FUNCTION _myfunction(
_fid integer,
_rid integer
)
RETURNS VOID AS $$ ...
1
vote
0answers
56 views
Database has duplicate values after running pgrouting
I am a newbie with postgresql and sql statements so maybe it is a trivial question, I'm sorry for that.
I am working on a postgis database and try to use the pgrouting function. My goal is to store ...
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 ...
1
vote
1answer
124 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.
...
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
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' ...
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
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 ...
1
vote
0answers
225 views
T-SQL with SDE and Web Map ArcGIS Server 10 MSSQL 2008
I need to build a system whereby the user of a web map (the standard web map that ArcGIS Server Manager builds) can edit a feature class's attributes. The attribute will be a 'Comments' field. The ...
1
vote
0answers
187 views
Color polygons using SQL Database based Rules in Openlayers
I want the rules to be applied according to values in a database. Is it possible to include external database information that is not in the shapefile?
In spoken words the original rule is "Color all ...
1
vote
1answer
624 views
Labeling classes for small roads on large extent maps in arcmap with sql statement
I have many small sub divisions that won't label nice, (lot of overlapping) unreadable. While using the bullet leader symbol. What would be the best statement that would place the labels in a clear ...
0
votes
3answers
2k views
Defining a Query with Multiple Values
I have been trying by best to create a definition query which would select a group of municipalities from among the many in my state. I have tried commands of all sorts of variations from ...
0
votes
1answer
533 views
MapInfo equivalent of SQL 'AS' statement
I'm trying to execute a SQL query in MapInfo, and want to change some of the column names to something more readable. The SQL command 'AS' doesn't seem to work - is there a MapInfo equivalent?
0
votes
2answers
496 views
Mysterious MapInfo query syntax errors
I'm struggling to get what seems like a perfectly normal query to execute in MapInfo v10.
In SQLite Manager (an excellent firefox plugin), this works as expected:
SELECT area_name, street_name, ...
0
votes
1answer
135 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 ...




