Acronym for Structured Query Language. A syntax for retrieving and manipulating data from a relational database.

learn more… | top users | synonyms

1
vote
1answer
16 views

PgRouting: Target vertex error

I'm trying to make a matrix that shows the cost from a node to the rest of the nodes in a network. The final result I'm looking for is not the cost, but only know if a car can or can not reach each ...
0
votes
0answers
27 views

Database connection fails when using db authentication, succeeds using OS

When i attempt to make a connection to a database on my SQL Server 2014 sever via Database connections in ArcCatalog using with db authentication i get the lovely "Connection was attempted with an ...
0
votes
1answer
18 views

Querying a raster per pixel using a secondary raster as a condition

So here's the problem. I have two rasters containing bathymetry data: one containing the bathymetry of the sea floor, we'll call this raster1, and another containing the difference between two ...
2
votes
1answer
32 views

ST_Union based on attribute

I have a road network of center lines of MultiLinestrings.They have nodes at every intersection. I try to understand how I can merge roads together that have the same category as attribute (There are ...
0
votes
1answer
53 views

What command to use in PostGIS to get same result as ArcGIS?

I have two shapefiles and i'm trying to do simple spatial analysis. When I want to know which polygon belongs to other polygon in other shapefile I always use select by location and in Spatial ...
0
votes
0answers
19 views

SQL query on field in Oracle does not return the same values that are seen in ArcMap/ArcCatalog

This is a very bizarre issue and I am at a loss as to why this is happening. A user running queries in SQL Developer brought this to our attention, and when we tried it we ran into the same problem: ...
1
vote
1answer
43 views

nearest neighbor query in SpatiaLite

I am trying to find the nearest line to each point in a layer, and I have over 1 million points. I want to be able to associated the closest unique line ID with the point unique IDs. I have tried to ...
0
votes
1answer
31 views

I'm not able to add SQL file to postgresql database

I started with basics and did these steps: createdb -U postgres -E UTF8 -O Peete gis -OK createlang -U postgres plpgsql gis (was already installed) -OK psql -U postgres -d gis -f ...
2
votes
1answer
72 views

Trouble using ST_Difference to remove overlapping features

I am trying to use ST_Difference to create a set of polygons (processing.trimmedparcelsnew) that do not contain any of the area covered by another set of polygons (test.single_geometry_1) using ...
0
votes
1answer
27 views

CartoDB (PostGIS) near function (distance) points to polygons

I have a CartoDB map here: Link: https://dms2203.cartodb.com/viz/78db6c02-3148-11e5-a42f-0e018d66dc29/public_map I'm trying to find the distance of the points to the polygon. If the points are ...
0
votes
1answer
21 views

Using ST_LINE_INTERPOLATE_POINT in OGR and python

I'm interested in finding the midpoint on a linestring using OGR and python. This can be a line with more segments. Could I use the ST_LINE_INTERPOLATE_POINT in python using the ExecuteSQL() method? ...
2
votes
2answers
25 views

CartoDB latlon change to lonlat

I have this script I am trying to use to search for a value within a CartoDB table. I can't seem to figure out how to reverse the order of the lat & long coordinates so they appear as lonlat... ...
0
votes
1answer
30 views

Spatial query ST_CONTAINS returns empty result

I want to create a database view in Postgres/PostGIS which returns a subset of the points stored in another table called locations. The subset is defined by an area stored in yet another table called ...
0
votes
2answers
19 views

Cartodb - Error: sql is read-only in NamedMaps

My map is not a named map. Map privacy is set to only people with the link. Why I I getting this error when trying to do queries? Has anyone else run into this?
2
votes
1answer
47 views

Joining data of two different datasets from varying distances and integrating into one dataset in ArcGIS

I have a pointfile of some 200 electrical boxes throughout the county. While the electrical boxes are "mapped", they are done so by using township range section data, so there actual location is not ...
1
vote
1answer
14 views

Table join not displaying in createLayer function in cartodb.js

I am trying to build on the cartodb tutorial to develop a map of fibre networks in Africa. The example works fine when my SQL select is very simple i.e. var layerSource = { ...
1
vote
0answers
31 views

ArcGIS Model Builder-Interate tables: Make Query/SQL expression

I'm new to ArcGIS and was wondering if someone could help me with my SQL expression. Essentially, I'm using model builder to iterate over several tables and Make Query table for each one. I'm trying ...
1
vote
0answers
20 views

ogr2ogr: export intersected gml using shapefile

I'm trying to do the same as the ogr2ogr example given by http://gis.stackexchange.com/a/119404/6458 The difference is that my inputs are a GML and a shapefile. Export.shp should only contain the ...
1
vote
0answers
33 views

Combining Datasets from multiple scraped data CSV files using FME [duplicate]

My main goal is to collect information of US Golf courses located in the United States and geocode them to create a meaningful map. I was able to scrape from four sites in which I created 4 CSV ...
1
vote
2answers
28 views

Trouble inputting interger values into an SQL statement within ArcGIS

So I am defining a function for use in a ArcGIS tool that will verify attributes, catch errors, and obtain user input to rectify those error. I want the tool to select and zoom to the segment that is ...
0
votes
1answer
49 views

Referencing CSV file in Select By Attributes SQL query?

I have 2 databases: Database 1: Point Shapefile with adress and APN (parcel numbers) as attributes. (Huge number of points, addresses for an entire metropolitan area). Database 2: CSV file with a ...
0
votes
0answers
14 views

Error Save to FeatureDataset in ArcObject C# [duplicate]

I have a SQL GeoDB in my server. I want to write some data in one of feature dataset and for that i use below method. public string insertdata(string tablename, List<tableRow> fields, string ...
1
vote
1answer
40 views

Error #1064 from MySQL searching database for results near lat/long

I'm trying to run a SQL query to search for a term and a users location. I need help to search my database for locations near a user with the description of 'X'. The users location (lat, long) is ...
2
votes
1answer
138 views

How to make SQL definition query in ArcGIS to show only unique values (hide duplicates)?

I have a vector file with field of type LONG. Some values of this field are duplicates. Is it possible to make such SQL definition query in ArcGIS 10.3 to show only unique values without duplicates? ...
1
vote
1answer
26 views

Dynamic XY to line with SQL

using arcmap 10.3 Trying to create a 'live' draw of lines between two coordinate points. So far I have been able to easily create the lines into a new shapefile using the XY to Line tool however I ...
2
votes
0answers
31 views

Aligning Points in Decimal Degrees

Running ArcMap 10.3 I am displaying a layer of manholes from a table coming from SQL. The XYs are in decimal degrees however they are displaying no where near my other layers (NYC PLUTO). I have ...
0
votes
1answer
16 views

Failure of non existant SQL statement after executing statements from a file with ArcSDESQLExecute object

As you see in my code I iterate and execute all the sql statements in an sql file using ArcSDESQLExecute object. It does work but when all statements have been executed the object returns 'None' ...
0
votes
1answer
36 views

Redirect if Clicked on a Marker in CartoDB

How can the user be redirected if he clicks on a marker in CartoDB? I have a dataset with the markers — the geometry and inside of the description-field the URL to redirect the user. I know I can ...
0
votes
1answer
49 views

Definition Query to find next date value in ArcSDE attribute table?

I have an ArcSDE feature class that contains a date field called "SALE_DATE". This sale date represents the bid date for ALberta crown mineral rights sales. A sale occurs about twice per month (one ...
1
vote
0answers
23 views

User Permissions on ArcSDE Geodatabase in SQL Server 2012

We set up an enterprise geodatabase in SQL Server 2012; Is it possible to set user permissions at a feature class/table level to only view certain attribute types? For example, a pipe layer has ...
1
vote
1answer
80 views

Split a table of Multi/Linestrings into Unique Linestrings

Is there an efficient way to split a table of Multi/Linestrings that overlap() and touch() into unique Linestrings (note: creating edges using topology is going very...very...very slow). Here is ...
0
votes
0answers
27 views

SQL fails in python. In ArcMap error FDO error: -2147024871 returned

I'm having issues with an SQL expression for a feature class in a file geodatabase. When working in ArcMap, the SQL will fail on its first attempt, and produce the following error: However, when I ...
1
vote
1answer
41 views

Select ID by most recent date

I have a personal GDB table that has a non-unique SLID field and a date field. Basically there are multiple records with the same SLID numbers but different dates. I want to select only the most ...
0
votes
0answers
40 views

Densifying OpenStreetMap (OSM) network nodes?

I am working with osmconverter to convert osm files(*.osm) to *.pbf, then i use osm2po to get sql file that run into PostGis to get a network table. The last step is to run a createTopology ...
0
votes
1answer
53 views

SQL and ArcGIS data querying: what's the difference?

I am wondering if the language used by ArcGIS for data querying (e.g., search by attribute) is part of the SQL language, or to what extent there is a connection between the two (and where does it come ...
0
votes
1answer
71 views

MapInfo SQL: Selecting all columns from one table, some cols from second table?

I'm fairly adept with the SQL Select in MapInfo, but I'm running into something that's got me a bit stumped. I've got data in two tables that have a few columns in common. I want to join the tables ...
0
votes
0answers
11 views

Obtain minor distance given am array of points

I have built a query to obtain the minor distance given a point. SELECT name, city, region, Distance(GeometryFromText('POINT(-56.237076563852 ...
1
vote
1answer
67 views

Reference Selection in SQL query (where clause)

I keep raising errors with my where_clause in the 9th line of this script. FID is an Object ID field and I want the cursor to select whatever row it is currently pointing at. I don't know how to do ...
2
votes
1answer
34 views

SQL Server Geography Query works but Geometry Query Does Not - Different Tables, Similar Schemas

I am trying to get a Geometry query to work. A similar Geography query works fine but I must work with a table that uses a Geometry type. Although the Geography version returns lots of records as ...
1
vote
2answers
53 views

SQL query new feature with loop

I'm trying to create an individual buffer feature class for each column of an input feature class, where there is a field that contains the buffer distance. I think there is a problem with my SQL ...
1
vote
1answer
77 views

arcpy; Select by attribute with an If, then statement

I am looking for some advice on how to construct an if, then statement based on a select by attribute SQL query or some other method (search cursor?). I am asking users to input a unique ID ...
0
votes
1answer
61 views

Updating Oracle Spatial geometry column using SQL?

I am trying to update a table B geom column with the coordinates from table A. Table A having coordinates in two separate columns x and y. Table B to have the coordinates from Table A into Table B's ...
1
vote
1answer
49 views

ArcSDE - spatial index grid size for empty table

I'm trying to write the SQL to create a feature class and spatial index in an Oracle SDE geodatabase using ST_Geometry. This is how I'm making the table: CREATE TABLE STREETS (ID NUMBER(11) NOT NULL ...
1
vote
1answer
34 views

Query Sql Error

I want to join these 5 tables with MapBasic, because i want to use in statistic : Select * From Malade, Maladie, Ilot, Etat_Ilot, Pauvreté Where Malade.Maladie = Maladie.ID_maladie ...
0
votes
1answer
30 views

storing metadata of various services according to ISO 19119

I need to store the metadata of web services according to ISO 19119 standard.Hence I am looking for some guidelines for designing the database for storage.Can any one suggest any document to help in ...
2
votes
3answers
92 views

How to use the SQL in select by attribute to select the entries for each values in certain field?

I am trying to use select by attribute for the table in ArcGIS, which is similar to the following picture (lets say): I want to select those entries for each A and B, which have maximum count. I ...
0
votes
0answers
58 views

Geo spatial extensions in MariaDB vs MySQL

MariaDB is interchangeable with MySQL, but are there any differences in terms of each respective GIS features? Switching from one to the other is still a drop-in replacement with geo data types or ...
2
votes
0answers
66 views

Visualizing variability in the size and shape of polygons

I am working with a data set of area restrictions imposed by criminal courts. These restrictions ban a person from entering a demarcated area. These restrictions vary in their size, shape, and ...
0
votes
1answer
36 views

How to connect SQL SSMS to ArcGIS file geodatabase

I've found this reference article talking about how to query a file geodatabase using SQL. ...
0
votes
1answer
66 views

select by location point in polygon with sql query

I have 2 tables table a this one a polygon layer with 10000 records table b this one a point layer with 600000 records in postgresql geodatabase i select a polygon feature with the query by input ...