A query layer is a layer or stand-alone table that is defined by a SQL query. Query layers allow both spatial and nonspatial information stored in a DBMS to be easily integrated into GIS projects.

learn more… | top users | synonyms

0
votes
1answer
523 views

CartoDB layer selector - selecting data from 2 layers

I used the CartoDB layer selector example (http://cartodb.github.io/cartodb.js/examples/layer_selector.html) with my data. Works fine. Now, what I really want to do is to select data from 2 layers at ...
3
votes
1answer
1k views

Why is Oracle Spatial Query Layer Not Displaying in ArcMap?

I am having an issue with an Oracle query layer using SDO_Geometry not displaying. I have created a polygon layer/table within oracle, registered the table with the SDO_GEOM_METADATA and created a ...
0
votes
1answer
48 views

Grouping layers in Table of Contents in ArcGIS for Desktop?

I'm trying to group layers in the table of content so that I can expand or collapse them as needed. Not sure how. I'm using ArcGIS 10.3 for Desktop.
3
votes
1answer
284 views

How to clip a Oracle query layer directly in a Python script?

I have a query layer directly running from ORACLE database in a MXD. I want to clip this layer with a layer being created in another MXD in a Python based tool. My question is to do this clip ...
0
votes
1answer
50 views

Copy query feature layer into a feature class - error 000732

I am trying to create a python script to copy data from a MSSQL view (includes a geometry field) into a feature class. They are both held within the same database. I have tried arcpy....
8
votes
1answer
542 views

Is it possible to have dynamic layer names in QGIS project?

I have a QGIS project with layers, based on PostGIS SQL queries that use current date. Since the data in the database changes, these queries return different data every new day. Is it possible to ...
1
vote
0answers
32 views

QGis Graphic Query builder for PostGis

My question is about availabe QGis Plugins that could help me with the following issue: I have a PostGis database that has one shapefile as a main table and a lot of tables containing the shapefile's ...
1
vote
0answers
44 views

Can't specify OID field in arcpy.MakeQueryLayer_management

I manage a library of query layers and have recently had the need to apply the same update to a bunch of them at once. Seems the only way to do that in python is to create new ones and apply ...
1
vote
3answers
53 views

CMV Search widget url query string

I am migrating my Flex eSearch widget to the CMV Search widget. I need to be able to pass a query through an url within the widget. Currently my widget has 8 URLs that are in the widget. Flex Code:
0
votes
1answer
52 views

ArcGIS query layer shape=long integer and not geometry

I want to add a Query Layer in ArcMap to eventually publish WMS services. WMS services cannot be created with a selection layer so I though I would try the Query Layer variation. My problem is that I ...
4
votes
0answers
104 views

Adding data from PostgreSQL to Query Layer of ArcGIS for Desktop warns that given coordinate references are incompatible?

When adding data from PostgreSQL in a Query Layer I get the warning: The given coordinate references are incompatible I have added many other layers with the same properties no problems, but I ...
0
votes
0answers
41 views

Return table names for query layers using arcpy

The dataSource property for layers does not return the name of the tables used in query layers. Instead, it returns something like the following: 'Database Connections\\ConnectionFile.sde\\sde.SDE.%...
6
votes
1answer
116 views

Query Feature Class Service - Portal display

I am new to arcgis and i have tried to use the right terminology. I have a Query Feature Class consisting of Polygons and points referrencing a non-geodatabase that I have published as a service via ...
0
votes
0answers
37 views

Storing Select Statements for ArcGIS Query Layers: LYR Files vs Views vs Application Code

I've inherited maintenance of an extension to ArcGIS Desktop (ArcObjects, C#) that allows users to view spatial data and related attributes from our databases (SQL 2008 R2). This is of course ...
3
votes
2answers
44 views

How to detect Query Layer for toolvalidation using arcpy?

For an arcpy toolvalidation script, I have been trying to figure out a good way to detect ArcGIS layer files (*.lyr) based on "Query Layers", and to distinguish them from "normal" feature layers ...
4
votes
2answers
149 views

In terms of SQL, what exactly is Query Layer's “Unique Identifier” doing?

When you make a link with a database using Query Layer in ArcMap, you must select a Unique Identifier, which ensures that the resulting Layer only has unique records in the Attribute table. In some ...
0
votes
1answer
515 views

SQL Server geometry vs. geography in Esri map service

We have a SQL Server 2008R2 database where point coordinates are stored as decimal degrees. I want to create an Esri map service which shows those points. As the point data is dynamic I decided to ...
0
votes
0answers
52 views

Utilize a Domain for a Query Layer in ArcGIS

I'm using the ESRI "Web App Builder for Developer" and Robert Scheitlins "Enhanced Query" widget. I'm trying to create a map that allows users (mostly police officers) to select a Crime Code (of ...
4
votes
1answer
104 views

Mapping SQL tables in ArcGIS Desktop

I have several tables in SQL server. I am trying to visualize my data in ArcGIS. However, I have not been able to do so. I started off my making a database connection in Arc Catalog to my SQL. I did ...
0
votes
0answers
65 views

Rasterize layer with GDAL after attribute filtering

I am working with GDAL/OGR and I need to do the following task : I have a shapefile with many attributes. I performed a query over one of them, "type_of_building='Church'". I have done this with the ...
1
vote
1answer
294 views

Using database tables with bigint columns in ArcMap query layer?

I am very new to GIS and am using the ArcMap 10 program. Currently, I am trying to set up a query layer from a remote database. I am able to connect to the database, but I am having trouble making ...
1
vote
0answers
43 views

Need Help Creating Query Layer From Oracle For Past 365 Days [closed]

I have several Query layers that work fine for generic, long term date ranges such as: This shows all entries that have the previous YEAR in the date field. AND To_char(ds.calendar_date, 'YYYY') = ...
0
votes
2answers
115 views

ArcGIS 10.2 Query layer ID field using double / floating field?

I am using ArcGIS for Desktop 10.2. Am I correct in understanding that ArcGIS will only let you select an integer or text fields as the "key" ID when adding a query layer? Our Oracle enterprise ...
2
votes
1answer
2k views

Can I create an Oracle Spatial View from a non-spatial table?

Let's say I have an Oracle database table with latitudes and longitudes. I don't have access to modify the schema of this table, or even create tables. However, I can create views and indexes on those ...
2
votes
2answers
140 views

ESRI QueryLayer + Javascript API - map displays inconsistent results

We recently migrated one of our map services from FGDB to an SQL Server spatial db backend. We are noticing a problem now in that the map appears to display locations inconsistently. I created a ...
0
votes
0answers
82 views

Creating Query Layer with 1:M relationship in ArcGIS?

I am trying to create a query layer in ArcGIS which contains 1:M relationship, When i execute query i am getting blank feature class. My query is as below SELECT a.Industrialcode, a.Industrialname, a....
2
votes
2answers
309 views

Negative values in ArcGIS API for Flex app?

I have a contractor working for me on a Flex application. He retrieves recordset for a intersect query from the web service published in house. But he is getting some ids as negative random number ...
0
votes
1answer
93 views

Intersection of two tables using the matching values in multiple fields

Primary usage of ArcGIS Desktop Basic: I have to find the intersection of two tables in the same file geodatabase based on the values in multiple fields. Almost all queries to find some help are ...
1
vote
2answers
153 views

Adding PostGIS query layer says Query class name is invalid?

I am having issues with adding postgis query layers in ArcMAP 10.2.2.3552, not doing anything special just adding a layer, this works in 10.2.1 so I don't know if its a bug or something Also this ...
4
votes
1answer
458 views

Making query layer with query parameters from generated values using ArcGIS ModelBuilder?

I want to join a relationship table (same database, not in sde) to an ArcSDE feature class to distplay only needed features. This has to be done multiple times according to every row (value) of an ...
4
votes
3answers
5k views

Query Layer with user-defined (dynamic) parameters in ArcGIS 10.1

I have prepared and published with ArcMap 10.1 to my ArcGIS Server a Query Layer to access some information in my database. My output map represents the European Union states and using annotations, ...
6
votes
1answer
424 views

How can I exclude a field on a table from being copied?

I have a query "layer": >>> r = arcpy.MakeQueryLayer_management(r'C:\path\to\connection\file\connection.sde', 'TEST', 'SELECT T.ID AS OBJECTID, T.* FROM MY_TABLE T WHERE T.SOME_COLUMN = 1', ...
1
vote
0answers
63 views

Export Joined table an Feature layer based on a query

I have a table and a layer joined fine, I am trying to export the end result into a file geodatabase, the export is fine if I specify specific name, other than that it exports the original layer data. ...
2
votes
1answer
261 views

Model Builder Query by date

I've created a model that does several spatial joins based off of a lat/long in a table. In the table, I have a "Modified_date" which gives year, month, date, time. This model is set to run ...
2
votes
1answer
1k views

Adding query layer to MXD in ArcPy?

I want to add a query layer to an arcmap document so that whenever i have a db data update, it is reflected in my ma and I can update my service through python script. This is my script so far... ...
1
vote
2answers
343 views

How to populate a table with geom line? [closed]

I have the coordinates of a lot of points in a table. In pgadmin I want to make a line that passes on these points. I already have my Coordinate point im my table. I want to make line with those ...
1
vote
0answers
100 views

Publishing map to ArcGIS Server with time enabled data and query joining transposed data with shapefile

I am trying to figure out if I can publish my map service to ArcGIS Server that has time enabled data and uses a query table.... The query table joins my transposed time data and my shapefile. When I ...
1
vote
1answer
920 views

Why does reading shapefile from PostgreSQL database give Error reading OID from table …?

I'm using arcgis 10.1 and i have a connection to a PostgreSQL 9.3 database. When i try to load a shapefile using the add query layer I get an error when opening the attribute table. The error says "...
0
votes
0answers
336 views

ArcMap 10.1, the identify tool does not show feature attributes on a query layer on a PostgreSQL database. Why?

I'm developing an ArcGIS 10.1 desktop map editing application using ArcEngine and ArcObjects. I'm using a PostgreSQL database. After a direct database connection (using a query layer), I displayed the ...
7
votes
3answers
6k views

Why does query table return more records than expected?

I need to join one feature class and one table. This is a one to multiple join, therefore, my only option seems to be by creating a query table. My problem is that the fields I want to join do not ...
2
votes
1answer
820 views

ArcGIS Publish query layer as Feature Service fails

I have a query layer that's simply a DB view call in PostgreSQL, the view is as such: CREATE OR REPLACE VIEW daily_query AS SELECT b.id, b.first_name, b.last_name, c.assignment_date::date ...
10
votes
5answers
29k views

How to create a new layer from a selection in QGIS?

I have been using ArcMap for the last three years. But I am now considering switching to Quantum-GIS. Is it possible to create layers from selection in QGIS? I am using QGIS 1.7.4-Wroclaw. UPDATE: ...
2
votes
1answer
640 views

Accessing PostGIS raster data using Query Layer in ArcGIS Desktop?

I tried to load raster file (jpg) into post gis using the syntax provided here "C:\Program Files (x86)\PostgreSQL\9.1\bin>raster2pgsql -I -C -e -Y -F -s 102003 -t 300x300 ras_test.tif ras_test1 | psql ...
4
votes
1answer
2k views

Use arcpy to connect to database without connection file

It seems like arcpy can only work with connection files. This creates one of two problems: Deployment requires manual creation of connection files. We have to write a bunch of code to recreate the ...
3
votes
0answers
717 views

Changing workspace path of query layer using ArcPy?

I'm trying to change the workspace path of a query layer using the code below and it always breaks. The layer is connected to a view in an Oracle Spatial 10g database. The database is SDE enabled ...
1
vote
0answers
286 views

Query layer in ArcGIS 10.2.2 with PostgreSQL not querying data

After some days I was finally able to import OSM data to a PostgreSQL database and connect it with ArcGIS 10.2.2 I can load every piece I want by simple clicking "Add data ..." however a SQL query ...
3
votes
0answers
474 views

ArcGIS FeatureService/Dynamic Map Service using SQL joins and aggregations

I have a bunch of operational tables, some contain spatial data, some do not. In order to fulfill all my operational mapping reports, I will need to have the flexibility to have feature services or ...
0
votes
1answer
98 views

Requesting help designing the query in a Query Layer

I am pulling data from our OMS SQL database to show our SAIDI and SAIFI numbers visually for our operations department. I have a functioning query that can pull in the needed data, and currently I ...
3
votes
2answers
975 views

Defining OID causes Query Layer on PostGIS to disappear from ArcMap?

I used query layer to load my layer from PostGIS and show it in ArcMap 10, I had two cases; if I defined the OID in the configuration of connection, there was no problem with the attribute table of ...
1
vote
0answers
99 views

Real-time Feature/Geometry Aggregation in Map Service Layer

Use-Case Provide a map service layer that perform a real-time aggregation of geometry objects grouped on a set of criteria from a normalized data source, labeling the resulting image based on data ...