Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [query-layer]

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.

0
votes
0answers
20 views

Adding ArcGIS Pro Query Layer?

I am attempting to add a query layer to ArcGIS Pro 2.1.2 via SQL Server. The table consists of Ticket_ID, Latitude, Longitude. The query layer works if I only add the top 1000 rows. However, when I ...
1
vote
1answer
56 views

Make Query Layer - where are the results?

I'm using MakeQueryLayer to create a view from a database table in the ArcMap python window. The command completes successfully but I can't see the result. Where does it go? arcpy....
2
votes
1answer
90 views

Updating ArcGIS Online data from SQL Table

I am attempting to build an Operations Dashboard in our ArcGIS Online account using data from a SQL Server database. I’ve successfully added the data from SQL to ArcMap using the New Query tool, and ...
0
votes
1answer
55 views

Fetching query from query layer using ArcObjects and C#?

As shown in the image below, I need to fetch query mentioned within query section of a layer using ArcObjects in C#. IDocument doc = ArcMap.Application.Document; IMxDocument ...
1
vote
0answers
37 views

Setting ID in query as IQueryDescriptions OIDFields throwing error?

I have a layer and the query for layer is a select query consisting of ID field in it. This query is being executed on top of Oracle and its throwing an exception for field "ID" when "ID" field is ...
3
votes
1answer
114 views

Why is query layer rounding down coordinates to 6 digits?

We have a SQL table view with point locations and are creating a query layer from it. However, the resulting points do not plot to the same location as the latitudes & longitudes in the table. In ...
0
votes
0answers
44 views

How to edit a range parameter?

I have a question concerning ArcGIS Pro. I've created a query layer in Model Builder that runs successfully, but when I replace where date_time between to_date('2017-06-30 00:00:00', 'YYYY-MM-DD HH24:...
1
vote
0answers
108 views

Make Query Layer - field not available as unique identifier when using NVL [duplicate]

I need to create a spatial view with Make Query Layer. My query includes outer joins, so I must combine every table's ID field to create a unique identifier. Since there might not always be a child ...
2
votes
1answer
71 views

Selecting features from an expression

I am having problem creating a query. I have a data map, which is organised in areas with codes (which in turn correspond to funding oportunities). I am trying to select for each code a layer. Up ...
1
vote
0answers
163 views

Connecting ArcMap to Oracle DB

I am trying to establish a connection from ArcMap 10.0 -- Service Pack 5 to an Oracle DB (I thought it was 10g if might be 11g) on windows 7.. It is windows have connected to the database via Catalog....
5
votes
1answer
332 views

Edit a Query Layer with Arcpy

In ArcGIS Desktop 10.4, is it possible to edit programmatically with Python the SQL query of a Query Layer? I'm not referring to the Definition Query of the layer, but to the window that is manually ...
1
vote
0answers
162 views

Make Feature Layer from Query Layer arcpy ERROR 000229

My project starts from a MXD containing Query Layers. I have to prepare the data in this "MasterMXD" for use in an offline application. Working with ArcMap 10.2.1 for this project. My Python script ...
2
votes
1answer
86 views

Using ESRI Query Layer to query OSM data in PostGIS database connection?

I have managed to connect to my OSM data using database connections in ArcGIS Desktop. I have the OSM line, point, polygon and roads tables. Now I am trying to query the tables using the Add New ...
3
votes
1answer
239 views

Creating symbols with multiple colors each from attributes

I use ArcMap 10.3 to create a query layer of points. The layer is used in a JavaScript API map as a ArcGISDynamicMapServiceLayer. Each point has two attributes: point_color and frame_color. I have 10 ...
-1
votes
1answer
384 views

Export Query Layer to shapefile using arcpy [closed]

Composing a map using query layers in ArcGIS 10.4.1 (Basic) the final step is to backup the data used when the map is finalised. Exporting manually is straight forward. But using the conversion tool ...
1
vote
0answers
55 views

ArcGIS WFS Errors - Multiple Feature Class References

I am trying to add WFS capabilities to an existing MXD, but it throws errors for multiple references to a Feature Class. To work around this, I've tried two options: Creating database views and ...
2
votes
1answer
73 views

ESRI JAVASCRIPT API - Can you return a list of fields from a published Querylayer

I have a query layer that is published onto arcGIS server. I am having difficulty returning the fields in a javascript application. I need to be able to iterate over this array. Code is bellow.. ...
3
votes
0answers
352 views

Publish a Query Layer as a Feature Access Service - ArcServer

I am connecting to a SQL Server 2016 database, and adding data into ArcMap 10.3.1 as a Query Layer. I want to publish this data as a Feature Access service to ArcServer 10.3.1. I have no problems ...
0
votes
2answers
504 views

Use multiple connections/databases in a query layer?

I have access to two databases, each with a separate connection. The first connection is an .sde connection to a SDE 10.3.1 Oracle database, and the second connection is a .odc OLE DB connection to a ...
3
votes
3answers
911 views

Converting double field to integer in database view so ArcMap query layer can use field as unique identifier

I have a field in a table that is a double data type, but the values are actually integers. The table is from third-party software, so I don't have control of the field data types. I'm attempting to ...
0
votes
1answer
2k 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.
1
vote
1answer
269 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....
2
votes
0answers
368 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 ...
2
votes
1answer
161 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
293 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
274 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 ...
0
votes
0answers
64 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.%...
3
votes
2answers
244 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 ...
7
votes
1answer
320 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 ...
4
votes
2answers
398 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 ...
4
votes
1answer
857 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
364 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
0answers
95 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') = ...
1
vote
2answers
364 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
2answers
278 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
1answer
390 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
1answer
1k 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 ...
1
vote
0answers
86 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. ...
1
vote
2answers
1k 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
150 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 ...
9
votes
1answer
812 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
1answer
793 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 ...
1
vote
0answers
515 views

Query layer in ArcGIS Desktop with PostgreSQL not querying data? [closed]

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
1k views

Changing workspace path of query layer using ArcPy? [closed]

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 ...
2
votes
2answers
267 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
838 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 display only needed features. This has to be done multiple times according to every row (value) of an ...
4
votes
0answers
139 views

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

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 ...
2
votes
1answer
576 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 ...
4
votes
1answer
1k views

Unable to edit PostgreSQL/PostGIS layers in ArcMap using query layers?

I am connected to the database, have added a layer, started edit session, but I am unable to edit the attributeeo table of said layer. ArcMap 10.2.2 tells me that it is not an editable layer. When ...
0
votes
1answer
117 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 ...