Select to view content in your preferred language

AcGIS Pro 2.4 | How to display X,Y point coordinates in Query Layer?

5824
11
12-11-2019 08:13 AM
VincentLaunstorfer
Frequent Contributor

Hi,

In an Oracle DBMS, I created views with X and Y coordinates in columns, in WGS84. In ArcGIS Pro, I tried to create a Query Layer in order to display live and up-to-date datasets. I managed to select an integer unique identifier and the query layer opens as a Table in the Content. However, I'd like to display it as a point layer in the Content. If I try to right-click the table and Display XY, it opens the geoprocessing tool XY Table to Point which would create a copy of the data. This is not what I am expecting. How to display point layer XY, stored in columns, in a Query Layer based on an Oracle view (with no spatial column) ?

Thanks 

PS: I changed this question to ArcGIS Pro instead of Managing Data as it looks more appropriate

0 Kudos
11 Replies
VincentLaunstorfer
Frequent Contributor

In ArcMap 10.5.1, the Catalog does show the proper Point icon for points which is better than an empty icon in ArcGIS Pro 2.4.2.Right-clicking the view, either in ArcMap or ArcGIS Pro, both describes the views correctly as:

However, the "Let ArcGIS Pro discover spatial properties for the layer" does not seem to work. However, if you leave the spatial field in the Query box and select "Define spatial properties for the layer", it does Validate and in the Next section, it is possible to specify Spatial Properties manually (it is not greyed out) as Point with proper CRS and thus use the spatial field from the Query.

But unfortunately, it ends up with the following error

Not nice!

It probably becomes an ESRI issue to fix...

0 Kudos
VincentLaunstorfer
Frequent Contributor

Hi,

AS a follow-up, I finally managed to use Query Layer with a sde.st_geometry spatial field as explained above and use "Let ArcGIS Pro discover spatial properties for the layer" when setting the Query Layer propoerties. It all works.

The problem was in unique identifier! My Oracle views have 12 digits number and ESRI can map up to 10 digits as explained here:

FAQ: Does ArcSDE support ObjectID field as 64-bit integers in Oracle? 

ArcGIS was confused and lost to display my query layers. I had to convert my unique identifier to text (instead of Long or Integer as ArcGIS would prefer) in Oracles views in order to fix the problem...

0 Kudos