|
IDEA
|
@DuncanHornby Thanks Duncan. That helps. Good call about cursors. I posted an idea just now for that: Update OOTB GP tools so that they use the new DA cursors.
... View more
04-25-2022
09:18 AM
|
0
|
0
|
1412
|
|
IDEA
|
It would also help if we could change the name of an attribute rule after it's been saved.
... View more
04-25-2022
08:43 AM
|
0
|
0
|
2046
|
|
POST
|
5. I suppose I could convert #1 to a custom function. And then create a function-based spatial index on the function to precompute the SDO_GEOMETRY. Downside: Getting Oracle and ArcGIS to actually use the index is tricky. Function-based spatial indexes - Tips. And as far as I can tell, function-based indexes aren't intended to be used this way. A pre-computed column in a table is more suitable. 6. Store the geometry as JSON in an invisible text field in the FC. Use a function-based spatial index to efficiently convert the JSON to SDO_GEOMETRY on the fly. - Oracle: Output LRS to a text-based format - SDO_UTIL.TO_JSON - SDO_UTIL.TO_JSON_VARCHAR - SDO_UTIL.TO_JSON_JSON Downside: I tested it on a FC with 15,000 features and it was slower than I'd hoped. I stored the JSON representation of the SDO_GEOMETRY in a text field in the FC. And then converted it to SDO_GEOMETRY on-the-fly in a query using sdo_util.from_json(). Unfortunately, it still took 4.5 seconds to run the query on all features. I was hoping it would be closer to 1 second, which is how long it takes to select a true pre-computed shape column from a table. alter table atn_json_text add json nclob invisible; --ArcGIS uses NCLOB for large text columns, so that's what I did too: https://desktop.arcgis.com/en/arcmap/latest/manage-data/gdbs-in-oracle/data-types-oracle.htm#:~:text=type%20will%20be-,NCLOB,-. update atn_json_text set json = sdo_util.to_json(wkt_lrs(sde.st_astext(shape),sde.st_srid(shape))); --wkt_lrs is a custom function: https://i.stack.imgur.com/dOfPg.png source: https://gis.stackexchange.com/a/428825/62572 commit; select sdo_util.from_json(json) from atn_json_text; I didn't try creating a function-based index. Reason: As far as I can tell, an FBI would only help me if I'm only selecting the geometry column, not any other columns (which would be rare). Whereas, if I select other columns too, such as an ID column (a much more common use case), then the FBI won't be used, which isn't what I want. When you add columns not in the index, the db has to read the table after reading the index. And as in your case the optimizer thinks it will return all the rows, it is easier for the db to just read the table. Source. But I'm not an expert on FBIs or indexes. So I might have misunderstood something. 7. For what it's worth, I tested a similar solution, but using WKB. Unfortunately, it isn't much faster than the JSON option: update atn_blob set sdo_blob = sdo_util.to_wkbgeometry(sdo_cs.make_2d(sdo_geometry(replace(sde.st_astext(shape),'LINESTRING M','LINESTRING')))); commit; select sdo_util.from_wkbgeometry(sdo_blob) wkb_to_sdo from atn_blob Execution time: 3.5 to 5.5 seconds (varies) Even if I did want to use that option, I'd need to wait for a Oracle to fix a few issues: Idea: Support M-enabled WKB Idea: Support LINESTRING Z/ZM/M wkt syntax Convert 3d multi-part WKB to SDO_GEOMETRY Related: Convert M-enabled SDE.ST_GEOMETRY to SDO_GEOMETRY using SQL
... View more
04-23-2022
01:45 PM
|
0
|
0
|
5402
|
|
POST
|
I have SDE.ST_GEOMETRY polyline FCs (tables) in an Oracle 18c geodatabase. I'm building various SQL queries on the tables. It would help if I could use Oracle Spatial/SDO_GEOMETRY functionality like Spatial's linear referencing functions. Unfortunately, it's not possible for me to change the datatype in the table from SDE.ST_GEOMETRY to MDSYS.SDO_GEOMETRY, due to existing dependencies on the ST_GEOMETRY shape column. Also, it seems like ArcGIS only supports a singe geometry column per table. So it's not like I can just add a SDO_GEOMETRY column to the table, without risking problems in ArcGIS. Alternatively, what are my options for generating a separate SDO_GEOMETRY column so that I can use Oracle Spatial functions? For example: Convert from ST_GEOMETRY to SDO_GEOMETRY in a query on-the-fly. Downside: the query is complicated/fragile/slow. I don't want to make the conversions every time the queries are used. Add an invisible SDO_GEOMETRY column to the table. Update the column with a db trigger. Add a spatial index. Downside: Invisible SDO_GEOMETRY columns aren't supported in Oracle. Also: Idea: Support invisible SDO_GEOMETRY columns. Create a parallel table that has a common ID column and a SDO_GEOMETRY column. Create a trigger on the ST_GEOMETRY table that updates the parallel table after INSERT, UPDATE, or DELETE. Or use calculation attribute rules in ArcGIS Pro to do something similar. Downside: Adds extra tables/complexity that need to be managed. Joining from the ST_GEOMETRY table to the parallel SDO_GEOMETRY table might be slow for large datasets. Parallel materialized view with an SDO_GEOMETRY column. Downside: A different department would need to create and manage the the materialized view, since GDB data creators/owners don't have CREATE MATERIALIZED VIEW privileges. (It's always a pain when you can't manage your own stuff.) Does anyone have any thoughts on those options? Or are there any other options that I've overlooked? Related: Choose spatial column when adding data with more then one spatial column
... View more
04-23-2022
01:43 PM
|
0
|
6
|
5409
|
|
POST
|
I’m trying to find a version of ArcGIS Pro where calculation attribute rules work properly when editing geometries with M-values —and— is supported by our version of License Manager. It seems like modern versions of Pro don’t work with our version of License Manager. So I’m trying to find version of Pro that fits. Thanks.
... View more
04-22-2022
08:02 AM
|
0
|
1
|
3117
|
|
POST
|
As an ArcGIS Pro user (non-IT, no access to License Manager), is there a way for me to determine what version of License Manager I’m using?
... View more
04-22-2022
07:09 AM
|
0
|
7
|
3141
|
|
POST
|
Assorted thoughts (although I use Oracle, not SQL Server): Occasionally, I've noticed strange behavior when selecting features from spatial views that are registered with the GDB. If I export the view as an FC, then the selection issues don't happen with that FC. The selection issues don't happen in non-registered views either. So, I try to avoid registering views with the GDB, unless it's actually needed for publishing a map service to Portal, etc. Registered view gets buggy when database link added [closed] Unexpected query layer results: Why does unioning with DUAL fix it? When using Oracle queries/views in ArcMap, I've found I need to cast the ObjectID to an integer: cast(objectid as number(38,0)) as objectid. Otherwise, ArcMap sometimes doesn't recognize the ObjectID as a valid unique identifier. I'm not sure if something similar is needed in SQL Server or not. For cases where we don't have an ObjectID, using Oracle's ROWNUM column (a pseudocolum) seems to work pretty well too: cast(rownum as number(38,0)) as rownum_. Note: the column can't be called "rownum"; it needs to be called something else like "rownum_". Some people say using ROWNUM as the unique identifier will produce unexpected results. But I haven't found it to be a problem. The key thing is: the unique identifier definitely needs to be unique. Otherwise, unexpected results do occur -- especially in the attribute table. Does SQL Server have an equivalent column to Oracle's ROWNUM pseudocolumn? Unique identifier fields Integer representation of textual value (as unique ID for query layer) For what it's worth, I noticed that the SDE.ST_GEOMETRY datatype was particularly slow when used in some spatial views (data source: dblink/an external database). I found that SDO_GEOMEMTRY in a spatial view, or simply using an XY Event Layer (based on numeric XY columns), was much faster than SDE.ST_GEOMETRY. I talk about it here: Are XY event layers optimized/indexed on-the-fly? I don't have any experience with indexed views in SQL server. But I believe Oracle's similar functionality, materialized views, does work in ArcMap. Although materialized views are essentially tables, they're not just an index, so I suppose the two concepts aren't really the same/can't be directly compared. Note: Registering materialized views with the GDB is a bad idea -- I think it converts the materialized view to a regular table, which breaks the sync. I don't know if the same thing applies to indexed views in SQL Server or not. Materialized view breaks when registered with the GDB SDO_GEOM materialized view: Why is static field slower than dynamic field? (answer: spatial index was missing) Materialized view with FAST refresh on remote table: How to include a SHAPE column? Question: Do indexed views in SQL Server require a spatial index for fast performance? Is that even possible, since I assume an indexed view is still just a regular view? Have you considered converting the non-spatial table to a feature class, and then automatically populating the geometry using calculation attribute rules or a db trigger? Or if that won't work, could you create a parallel/helper FC that has a geometry, and populate that FC using attribute rules or db triggers? I know this post is old. And a lot of my points pertain to Oracle, not SQL Server. But I thought I'd share my thoughts in case they're helpful to anyone or trigger some ideas...
... View more
04-20-2022
07:57 AM
|
0
|
0
|
3446
|
|
POST
|
I'm a data owner in an Oracle 18c GDB, but I'm not in I.T. I'm looking for server-based scheduled automation options that I can manage myself, instead of waiting on IT for every little thing. Requirements: Weekly: Scheduled emailed notifications (IBM example -- available to all users) GIS use case: If there are any construction projects in a FC where the status is FUTURE and the date is < sysdate, then send me an email. Those records are out-of-date and need investigation. Nightly: Scheduled jobs to pre-compute fields and tables (IBM example -- available to power users) GIS use case: Precompute a HAS_CURVES field in a polyline FC, since we can't get that information via Arcade attribute rules or SDE.ST_GEOMETRY. Esri options: If I understand correctly, the current Esri automation offerings don't fit this use case: ArcGIS Notebook Server is generally only used by IT staff. That might not be true for all organizations, but it is for mine...and that's beyond my control. WebHooks are intended for IT staff, not available to power users like me. Scheduled geoprocessing tools are run on the user's local PC and are only run when the PC is turned on and logged in. That's not what I want. I'm looking for something more robust/long-term; something that's server-based. My organization doesn't have any 3rd-party automation tools like FME. So, I've come up with some alternative ideas for solving requirements #1 & #2 above: Weekly: Scheduled emailed notifications Create a table in the Oracle GDB called SKD_NOTIFICATIONS. Fields: VIEW_NAME, RECIPIENTS (comma delimited) Create db views to query for rows: CONST_PROJ_ISSUES_VW: Select construction projects in a FC where the status is FUTURE and the date is < sysdate. Create a Python script that would loop through each record in SKD_NOTIFICATIONS. For each record, if the corresponding db view has any rows, then send the recipients a notification email: "There are records in CONST_PROJ_ISSUES_VW that need to be investigated." Link: Sending Emails With Python IT: Set up a scheduled job on the GIS server (using Windows Task Scheduler) that would run the Python script on a weekly schedule. The Python script would use a .SDE connection on the GIS server to connect to the GDB. Alternatively, if IT doesn't like the Python option, then we could re-write the script as a PL/SQL procedure and use Oracle Scheduler to run it on a schedule. IT: Configure SMTP Server so that the script can send emails via MS Outlook Exchange or Office 365. Complete. The steps above would be used to send GIS email notifications on a weekly schedule. Nightly: Scheduled jobs to pre-compute fields and tables IT: Create a shared network folder on the GIS server (I'd have write access). Create Python scripts in the folder that precompute GIS fields and tables. Example: Precompute a HAS_CURVES field in a polyline FC. The Python scripts would use a .SDE connection on the GIS server to connect to the GDB. IT: Set up a scheduled job on the GIS server (using Windows Task Scheduler) that would loop through the Python scripts in the folder and run them. Complete. The steps above would be used to pre-compute data on a weekly schedule. Questions: Does anyone have experience with that kind of thing? Would either of those ideas work? Or can you think of something better?
... View more
04-20-2022
06:36 AM
|
0
|
1
|
1615
|
|
POST
|
I'm considering enabling Archiving in a few FCs in an Oracle 18c enterprise GDB. Are there any known tradeoffs with Archiving? For example, sometimes with geodatabase functionality, if we enable thing A, then thing B & C are no longer possible. Thanks.
... View more
04-18-2022
06:47 PM
|
0
|
0
|
736
|
|
IDEA
|
It would be helpful if we had the option to hide certain objects from users in Catalog (including objects that aren't registered with the GDB). If I remember correctly, we used to be able to do that with the SDE command line. But I don't think that's possible anymore.
... View more
04-18-2022
12:19 PM
|
0
|
0
|
775
|
|
IDEA
|
We also need to be able to remove the Z dimension from ST_GEOMETRY. Related post here: I need to remove Z dimension on spatial column (ST_GEOMETRY) with Esri on Oracle using the PL/SQL packages
... View more
04-17-2022
02:59 PM
|
0
|
0
|
2221
|
|
IDEA
|
As far as I can tell, the Points To Line GP tool can’t be used to create multi-part polylines: Points To Line GP tool ASSET_ID PART_NUM VERTEX_NUM X Y M
---------- ---------- ---------- ---------- ---------- ----------
001 1 1 0 5 0
001 1 2 10 10 11.18
001 1 3 30 0 33.54
001 2 1 50 10 33.54
001 2 2 60 10 43.54
Could support for multi-part features be added?
... View more
04-15-2022
04:18 PM
|
2
|
2
|
1508
|
|
POST
|
This post is quite old. I wonder if anything has changed since then? Any enhancements added to ArcGIS, etc.?
... View more
04-15-2022
12:16 PM
|
0
|
0
|
1669
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 03-20-2026 02:12 PM | |
| 1 | 03-19-2026 11:42 AM | |
| 1 | 06-03-2026 04:02 AM | |
| 1 | 03-18-2026 07:08 PM | |
| 2 | a month ago |