0
votes
1answer
24 views

Setting the Geometry with sql query

I am trying to merge data from a U.S. states shapefile with data on each state. I used this SQL query which is supposed to work: SELECT * FROM child_poverty_by_state UPDATE child_poverty_by_state ...
0
votes
1answer
78 views

SQL Geometry Query similar to Select by Centroid

Does anyone know if it's possible to query SQL geometry by something like 'centroid of polygon'...similar to ArcMap's select by location? I'm using SQL Server 2008 R2 as the DBMS. I have two polygon ...
0
votes
1answer
98 views

How to write to Sql server from MapBasic and insert rows

I have created a table in Sql server 2014 with the columns: Id (int), Geom (geometry), RouteId (int), Desc (varchar(MAX)) I have succeeded in making the table mappable through MapInfo I have checked ...
1
vote
2answers
100 views

Sql Query for percent of buffer filled with objects

Hi I am trying to write a query to find the percentage of a buffer polygon (Called 250_Buffer) that is filled with or contains other polygons in another layer (Called Development) any help that you ...
1
vote
1answer
32 views

Keep column titles when exporting SQL query in MapInfo

Is there a way to keep column titles when exporting a query in MapInfo as a csv or a new tab. This is my result: And my export looks like this: It's not a major issue, I jus like saving myself ...
1
vote
0answers
47 views

How to Build Query Table from two OLE DB tables using ArcPy?

When I run the following code to create a subset of a table, the error says "An invalid SQL statement was used" [Query]. The error shows in line 39. Is there any idea you can figure this out? import ...
0
votes
0answers
45 views

How do I use Arcpy to label based on two different expressions, then convert to annotation?

I am trying to open an mxd and turn on labels before converting them to annotation. I would like to turn on labels with 2 different classes, based on 2 different expressions, then convert them to 1 ...
0
votes
2answers
32 views

How can I optimize this point-linking query?

I have the following query, and am wondering how it could be optimised to run faster: WITH gps_nodes_1 AS ( SELECT "NODE_ID", "geog" FROM gps_nodes WHERE ST_Distance("geog",ST_GeogFromText('POINT( ...
-1
votes
1answer
133 views

Shortest Path Dijkstra

I would like to calculate the shortest path with dijkstra algorithm. sample query SELECT seq, id1 AS node, id2 AS edge, cost FROM pgr_dijkstra(' SELECT gid AS id, ...
0
votes
1answer
81 views

How to cut/split multipolygon with blade (linestring) into two pieces using PostGIS? [closed]

I struggle to do split operation in postgis I tried to build a query but Im always fail. Id like to cut a multipoligon with a blade (a linestring) into two pieces. These two objects have specific ...
1
vote
1answer
42 views

Rewrite query to match two points with a linestring in a different database table

OK, not sure if I've worded the title brilliantly, but here goes: Suppose I have: a table "gps_nodes" containing columns: "EASTING" (containing longitude data) "NORTHING" (containing latitude ...
3
votes
1answer
334 views

PostGIS intersection function

I have a problem with intersection function. I built my query following http://manual.linfiniti.com/en/postgis/geometry.html, 5.7 section. I made my clip object, a red linestring frame: But after ...
1
vote
1answer
143 views

Mapinfo SQL Query for compare for edited data in tables

I have a table that contain several columns, each has their own data. then, someone have made some change in the data (just a little one data editing). how do i know later what data have been ...
2
votes
2answers
404 views

Merge lines with the same 'name' attribute on QGIS?

I have a shapefile with a few thousand lines, each is a street segment. I'd like to merge all features with the same 'streetName' attribute into a single attribute. I only really care about the name ...
0
votes
2answers
143 views

oracle search against intersect of a region that covers the whole world doesnt find any records

I am new to Oracle Spatial, I am trying to implement a service that will take coordinates from a map, and search our database to find any geometries that intersect with that map view. I works fine for ...
2
votes
2answers
222 views

Select by Attributes - If string has a letter

I'm running ArcMap 10.1. I'm using a File Geodatabase. I have a string coordinate field that I want to clean and some records have letters in it (mostly 'N' or 'E' or 'n' or 'e' e.g. '6213210N' or ...
1
vote
1answer
195 views

IQueryFilter where Clause quering two feature class at a time

I need to query two feature class at the same time using IQueryFIlter. For eg - FeatureClass -- A has field OBJECTID FeatureClass -- B has field OBJECTID what i am tring to do is -- IQueryFilter ...
1
vote
2answers
58 views

Find the majority area within another area

I have a survey grid overlaid unto several administrative areas. Both are polygon features and I have performed a union on both features in order to determine the areal contribution of the segments ...
1
vote
1answer
515 views

Why isn't my select by attributes query working?

I'm running ArcMap 10.1. I have a point feature class joined to a table and am trying to query a field. If I do [field] = 'TEST', it selects all the fields. But if I do [field] LIKE 'TES%', it ...
4
votes
3answers
406 views

How to create Where Clause from user input via Python list?

I am trying to perform a query based on values in a Python list. The where clause will then be used in an Update Cursor, so that the rows NOT equal to the values in the list will be deleted. This is ...
1
vote
1answer
81 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 ...
4
votes
3answers
1k views

How to join two tables using date, time, lat and lon as common field?

I am sorry if the question is elementary but I did not find any clear discussion or guide to understand how to run a query in postgresql. So that a pointer to another website would be also useful. ...
5
votes
1answer
478 views

How to run custom queries on vector layers and display results?

Is there a way to display the result of a query in QGIS? For instance : To get the total number of inhabitants : SELECT SUM( inhabitants ) FROM countries To get the total density : SELECT ...
3
votes
1answer
152 views

Editing and Deleting Query Tables in ArcMap

How do I edit the query for a Query Table after it has been created? How do I permanently delete a Query Table? Even after I do right-click -> remove, it still appears in dropdown lists.
3
votes
1answer
187 views

How to query against time

I have a date-time field in a feature class which I want to query. The field has values like "2011-01-01 00:00:29". I want to query the data between the time 00:06:00 and 00:12:00. The date does not ...
4
votes
2answers
879 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 ...
11
votes
1answer
549 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
863 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
3answers
4k 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 ...