Select to view content in your preferred language

Create QueryLayer without the use of ArcGIS.Core.Data

962
2
Jump to solution
09-15-2021 12:39 AM
TomGeo
by
Frequent Contributor

Currently I am creating QueryLayer using ArcGIS.Core.Data functionality where I retrieve data from an Oracle database, utilizing the Database, and DatabaseConnectionProperties class etc.
It works! However, it is relatively slow, and I think it has something to do with the way the SDK connects and reads the database in question.

For simple retrieving of unique values from a database table I am not using Esri classes any more, but went with Oracle.ManagedDataAccess. It is a drastic change in response time doing so, and my "customers" love it. 

Hence, I would like to use Oracle.ManagedDataAccess to query the database, retrieve the data and use them to create a FeatureClass, and FeatureLayer.

Retrieving the data is not the problem, but creating the FeatureClass is.
Currently I am creating the FeatureClass through the OpenTable method of the ArcGIS.Core.Data Database class. That means I am back to square one, because I have to establish the connection through the AGP SDK.

Is there a way to use Oracle.ManagedDataAccess to create QueryLayer?

- We are living in the 21st century.
GIS moved on and nobody needs a format consisting out of at least three files! No, nobody needs shapefiles, not even for the sake of an exchange format. Folks, use GeoPackage to exchange data with other GIS!
0 Kudos
1 Solution

Accepted Solutions
RichRuh
Esri Regular Contributor

Thomas-

There's no way to directly create a FeatureClass/FeatureLayer from a data structure returned from an Oracle API.

Some ideas:

  • Create a plugin datasource that reads from the Oracle.ManagedDataAccess. Plugin datasources are described here. The resulting feature class is read-only.
  • Copy the data into a memory geodatabase. This is read-write, but of course any changes you make are to the memory database, not the Oracle tables.

I hope this helps.

--Rich

 

View solution in original post

0 Kudos
2 Replies
RichRuh
Esri Regular Contributor

Thomas-

There's no way to directly create a FeatureClass/FeatureLayer from a data structure returned from an Oracle API.

Some ideas:

  • Create a plugin datasource that reads from the Oracle.ManagedDataAccess. Plugin datasources are described here. The resulting feature class is read-only.
  • Copy the data into a memory geodatabase. This is read-write, but of course any changes you make are to the memory database, not the Oracle tables.

I hope this helps.

--Rich

 

0 Kudos
TomGeo
by
Frequent Contributor

Thanks Rich,

I will try the plugin datasource way.

- We are living in the 21st century.
GIS moved on and nobody needs a format consisting out of at least three files! No, nobody needs shapefiles, not even for the sake of an exchange format. Folks, use GeoPackage to exchange data with other GIS!
0 Kudos