IDEA
|
I note that the new 2.6 OLE interface is read-only, and presumably one cannot copy fgb tables or featureclasses into Access either. But there is a simple way using the Microsoft Access Drivers (64 bit) and the python module pyodbc. With these installed I am able to write a single page python script to translate tables between the two formats. With a bit of extra work I am able to export the shape field as WKT or WKB into the Access table and bring it back again in a lossless round trip. Not the same as joining tables inside ArcGISPro but it does provide a simple exchange.
... View more
07-27-2020
05:47 PM
|
1
|
0
|
194
|
IDEA
|
I am very disappointed at the dropping of support for custom help tools. I used a proper help authoring tool to consolidate all the help for a project. I don't want to edit each tools "Metadata", I need proper help with images, diagrams, URLs and links to other parts of the help. Like we already have in ArcMap. Cmon Esri, the custom tools environment look really amateur now, a throwback to ARC/INFO of 20 years ago.
... View more
07-16-2020
10:07 PM
|
0
|
0
|
48
|
POST
|
But the Anaconda version of Python is slightly different for some libraries. The sqlite3 implementation has been compiled to disallow extensions and has not included Rtrees, This makes it impossible to use sqlite3 for geometry tables. Great. Now I have to hack the installation to replace the sqlite3.dll with the standard build and the mod_spatialite extension. Note that the geopackage is only designed for data exchange, not faster efficient geoprocessing...
... View more
05-04-2020
03:19 PM
|
0
|
0
|
43
|
IDEA
|
And now at 10.8 the sqlite functions are broken again. Is it because Esri are now using Anaconda compilation? Sqlite3.dll has been compiled without RTrees! Great, that means we cannot use spatial data in python. The solution is to hack the installation and replace the sqlite3.dll in the DLLs folder with the latest version from sqlite.org. While we are hacking, why not replace the spatialite400x.dll with a full replacement for mod_spatialite by downloading from spatialite.org the latest extension suite. Since there is now a Libs/sqlite3 folder in the standard install, pop them in there and add it to the system path.
... View more
05-04-2020
03:12 PM
|
1
|
0
|
171
|
IDEA
|
But which Sqlite spatial format? There are two systems already, the original spatialite which is handled with an extension to sqlite, like other databases, and the OGC geopackage format which is different to spatialite. ESRI influenced the geopackage format, and spatialite has bent to include the new metadata files. But there are still problems with the gpkg format. They forgot to include non-spatial tables in the format! So GDAL has added an extension that ESRI has not supported so far. Maybe they have recently, I haven't seen anything in What's New. I think spatialite is excellent, but there are a few things that obviously worries Esri developers. The type checking is lenient, like Excel, so they add a whole lot of constraints to the tables when creating them to avoid including text in numeric fields. There is no date type so dates have to be handled in functions. Dates default to an epoch of seconds since 1900, unlike anyone else and there are no converters outside sqlite. I store dates as strings so they can be transferred. FME is also very clunky when supporting spatialite. You have to use two writers and cannot use them together. It's all a mess. Spatialite has its own built-in spatial operators, used an R-Tree spatial index and is very very fast compared to a filegeodatabase. Because it supports SQL better there are some operations that are thousands of times faster. For example, add a field to a non-spatial table and populate it with geometry from another many to one related table, even from another database. Arcpy half-supports spatialite, you can use cursors and update tables but not geometry using the @shape operators. Copying from spatialite to another database is almost instantaneous compared to exporting to a file geodatabase. If you need to edit the data then simply use python and build an SQL query string by opening the database and extending the data to use spatial using the DLL already included in ArcGIS (because they use it under the hood for mobile apps). For interactive editing you will have to resort to QGIS so why not simply open it up in ArcPro?? It can't be any different to other geodatabases such as PostGIS or SQL Server, but without the overhead of a server.
... View more
03-03-2020
03:39 PM
|
1
|
0
|
171
|
POST
|
Install the latest version of Pyscripter 3.6.2 https://sourceforge.net/projects/pyscripter/ Use the 64 bit version On the <Run> menu item there is an option to set the interpreter. You can switch back between 2.7 and 3.6 at any time. Its Marvellous. I can continue developing scripts in ArcMap and ArcGISPro using the same IDE and the same scripts. It will support virtual environments set up with ArcGISPro. I make all my 2.7 scripts 3.x compatible with a few simple changes to the syntax and adding __future__ to the top. Change all the print statements to print() functions (use the utility 2to3.exe in the scripts folder), a few other minor details and you are good to go!
... View more
12-12-2019
02:38 PM
|
1
|
1
|
80
|
POST
|
You just use the ArcTool arcpy.management.AddSpatialIndex(). The help explains it will rebuild an existing index. Since the indexing is simpler you don't need to specify the spatial grid sizes. I have done this after loading data into a large featureclass and it makes a huge difference to drawing speed and processing. If processes appear to hang it is always worthwhile to interrupt the process, rebuild the indexes (including attribute indexes) and restart the process. Never be happy with any tool that takes longer than a cup of coffee. Find a better way. Note that you need to ensure that your features are small and contiguous relative to the full extent. If you have a large 'Mozilla' feature such as an enclosing coastline or large area punctuated with 'holes' representing forest you will defeat the spatial indexing. This is what the DICE tool is for, to split up unreasonably large polygons. The same applies to polylines. A single line representing a national highway included with short local roads will make all processes that use an index be very slow. Also do not be tempted to dissolve by a single attribute to 'normalize' the attribute table where one zone is represented by thousands of multi-part polygons. Running processing across a network is likely to be very slow. Process locally, which means: extract, process, replace.
... View more
12-12-2019
02:21 PM
|
1
|
1
|
62
|
POST
|
You can do this in ArcTools by creating a custom tool and then add your custom tool to ModelBuilder. It is not clear if you want to avoid any Python programming, but that is the simplest way to do exactly as you asked. You create an empty template layer (for geometry type, fields and symbology). Then you create a new tool and set the dialog to input a featuredataset (it needs the template). When the tool opens it asks you to draw some graphics similiar to the graphic Draw tool. You can also set attributes if needed, there can be more than one feature. It is very flexible. When the tool executes it passes the featuredataset as a parameter. This can be turned into a featureclass and exported as an output for use in the ModelBuilder chain. Interacting with the map in a script was always much easier to do in Workstation/AML and later ArcView/Avenue. If you are still interested in this approach I could post an example script. Here is the help where I needed the user to sketch a proposed marine reserve: Create MPA from Sketch or Features Zoom to the area Use the interactive sketch tool to draw polygons on the map You can use the graphic tools to draw circles, ellipses, rectangles or freehand polygons You can edit the graphic shapes, adjust vertices and in the graphic properties adjust to an exact coordinate When you select [OK] the parts will be assembled and saved to a new featureclass with the default name or the one you specified.
... View more
12-12-2019
01:53 PM
|
0
|
0
|
34
|
POST
|
I have a lot of Python workflows in 'legacy 2.7' that will have to move to 3.6 and ArcGISPro or Server. My solution so far is to simply upgrade each 2.7 script to be cross compatible to 2/3 so it does not matter which interpreter is being used. There are only a few trivial syntax changes and a few other changes that can be handled with a test for the python version. I have not found any benefit to moving to 64 bit for the vector and database work that I do. Maybe for raster processing where more is done in memory, but even then, do some partitioning to reduce the requirement.
... View more
12-12-2019
01:19 PM
|
1
|
0
|
43
|
BLOG
|
The latest 64 bit version of Pyscripter 3.6 does now handle conda environments. This saves you having to switch IDEs. It does interfere with Pyscripter32 even though they install in different places. But you can edit and run most scripts with the 64 bit version anyway. https://sourceforge.net/projects/pyscripter/
... View more
11-09-2019
03:52 AM
|
0
|
0
|
408
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:22 AM
|