Ahoj všichni,<\/P>
<\/P>
Každý měsíc vytvářím spoustu topologií, abych se ujistil, že mé polygonové vrstvy se nepřekrývají ani nemají mezery (ESN). Také spouštím topologii na mé vrstvě ulic, abych našel úseky ulic, které nejsou přichyceny. Tento proces většinou sestává z modelů.<\/P>
Protože se vždy snažím pomoci svým kolegům z Public safety, rozhodl jsem se sestavit svůj proces do Python AddIn, který "by měl být snadno použitelný". Začal jsem před dnem a mám hotovou kostru AddIn a nyní hledám Guinea Pig (dívám se na vás Chris Donohue, GISP<\/A> & Joe Borgione<\/A> ), aby ho použil!<\/P><\/P>Poslední aktualizace:<\/STRONG><\/P>- Vytvořen oficiální dokument: Topology Check Python AddIn (30.6.17)<\/A> <\/P>- Přidána chybová zpráva, když je pro určité kontroly vybrán nesprávný prvek (např. polygonový prvek je vybrán pro kontrolu dangle)<\/P>- Nyní funguje s ArcGIS Desktop Standard<\/P>- Nejnovější testovací verze, která zahrnuje kontrolu přerušení polygonu. Tato kontrola zajišťuje, že vaše liniové prvky jsou přerušeny, když protínají polygonový prvek. Stačí vybrat liniový prvek a polygonový prvek v TOC a spustit kontrolu.<\/P>Dropbox - TopoAddIn.esriaddin<\/A> verze 10.3.1 +<\/P><\/P><\/P>Tady je, co potřebujete:<\/P>ArcGIS Desktop Standard<\/SPAN> 10.3.1 nebo novější verze<\/P><\/P>Takhle to funguje:<\/P>1. Stáhnete si add in ZDE<\/A>. (verze 10.1 ZDE<\/A> )<\/P>2. Dvojklikem jej nainstalujete.<\/P>3. Otevřete MXD a přidáte polygonovou vrstvu a vrstvu ulic.<\/P>4. Nástrojová lišta by měla být k dispozici, ale pokud není, klikněte na Přizpůsobit -> Nástrojové lišty -> TopoCheck<\/P>5. Postupujte podle kroků na screenshotu!<\/P><\/P><\/P><\/P>Jak jsem řekl, je to stále rozpracované, zejména kontrola street dangle.<\/P><\/P>Dejte mi vědět, co si myslíte!<\/P><\/P>Tim<\/P><\/BODY><\/HTML>
Poslední aktualizace:<\/STRONG><\/P>- Vytvořen oficiální dokument:
- Přidána chybová zpráva, když je pro určité kontroly vybrán nesprávný prvek (např. polygonový prvek je vybrán pro kontrolu dangle)<\/P>
- Nyní funguje s ArcGIS Desktop Standard<\/P>
- Nejnovější testovací verze, která zahrnuje kontrolu přerušení polygonu. Tato kontrola zajišťuje, že vaše liniové prvky jsou přerušeny, když protínají polygonový prvek. Stačí vybrat liniový prvek a polygonový prvek v TOC a spustit kontrolu.<\/P>
Tady je, co potřebujete:<\/P>
ArcGIS Desktop Standard<\/SPAN> 10.3.1 nebo novější verze<\/P><\/P>Takhle to funguje:<\/P>1. Stáhnete si add in
2. Dvojklikem jej nainstalujete.<\/P>
3. Otevřete MXD a přidáte polygonovou vrstvu a vrstvu ulic.<\/P>
4. Nástrojová lišta by měla být k dispozici, ale pokud není, klikněte na Přizpůsobit -> Nástrojové lišty -> TopoCheck<\/P>
5. Postupujte podle kroků na screenshotu!<\/P>
Jak jsem řekl, je to stále rozpracované, zejména kontrola street dangle.<\/P>
Dejte mi vědět, co si myslíte!<\/P>
Tim<\/P><\/BODY><\/HTML>
I'm in. Let me download it and I'll give it a spin sometime today! Thanks Tim!
timw1984 cdonohue_roseville
I took a quick test drive earlier today, and so far it's pretty darn cool. What I like most about it is the fact that I can find topololgy issues in my enterprise geodatabase without the overhead of creating a feature dataset and subsequent topology; imho, feature datasets within an enterprise geodatabse should be avoided at all costs.
The add-in creates actual feature classes out of the errors, so for example, I got a points feature class of street dangles. We all know what a 'should not have dangles' topology looks like; you can't tell the legitimate dangles of cul-de-sacs from actual problems. I selected all my freeways and then selected just those dangle points that intersected the selected freeways; in about 10 minutes I had a dozen or so dangles on my freeways and ramps fixed that I had no idea about. I also spatially joined the non-freeway errors to my Cities polygon feature class, so the individual city-editors can quickly review just those points within their respective borders. Slick.
I'll be correcting some dispatch response polygon errors next, and if it goes as easy as the first trial, it should be a piece of cake.
Tim- I'll send you a follow up email with some "it would be even cooler if it could do this" notes in the next few days. Thank you a million times over for developing it and giving me the opportunity to try it.
Chris- You gotta try this!
timw1984 cdspatial
Joe,
the latest version should dramatically cut down on the "false dangles".
I can't wait to see your wishlist
Tim
Another quick update:
The new dangle tool is very Memory heavy when you have 50k+ road network. I had to close my 10 google chrome tabs and then it would work. Before it would crash my ArcMap.
Latest update added some dialogue pop ups when you run a check.
Sounds cool. I'll give it a look, but unfortunately I'm on 10.2.1, so it may blow up due to version differences (the City has been holding off upgrading due to many other systems that connect to GIS that are not compatible with the newer versions of GIS, like ArcFM).
Chris Donohue, GISP
The AddIn came in easily and looks good, but unfortunately no luck on getting it to work. I tried some test data in a File Geodatabase which was purposefully altered to have gaps and overlaps, but didn't get any results from running the AddIn tool. There was not any errors or other feedback, just no results.
I suspect it may be the ArcGIS version differences of 10.3.1 vs 10.2.1, i.e. the Python version associated with each version of ArcGIS has some critical difference (I'm still in the stone ages (10.2.1)).
I guess for now add that as a potential limitation for users.
Sad to hear that cdspatial
Could you give this one a try? Dropbox - TopoAddIn.esriaddin
I'll give that a try.
Hi Tim,
Your thread popped up in the summary GeoNet email today. I've downloaded and run your add-in a few times on our ESN and roads data. This is such a sweet tool, and will help a great deal with our multi-agency integrated public service data. I like the dialogues - you could even add the error count to them. It would also be great if you could designate a location for the scratch workspace, but it works fine as is. I will definitely keep up with this thread and I really appreciate you developing and sharing the tool! ETA: I'm on 10.4.1
Thanks,
Heather
Got some results this time. When run, the tools chug away and the classic "Not Responding" shows up, but then it finishes out after several seconds.
Tool runs:
Check for Overlaps - worked when run on parcels with an intentional overlap. Looks good.
Check for Gaps - no results for output feature class GapErrors_poly when run on parcels with gaps, but did get the parcels gaps correctly depicted as lines in GapErrors_line output (purple lines below).
Check Line Segments - DangleErrors output correctly found two dangles that were close to other lines, but missed dangles that were far from other lines. Could be a just be a tolerance setting, though.
Unfortunately, no results for OverlapErrors_line output despite the intentional addition of line overlaps to the street test data.
Note - I made some assumptions when running these, which may influence the results:
1. The tools ran without being in Editing Mode for the selected feature class, which I assume is OK. If instead it is assumed that the user is in Editing Mode for the feature class being checked, let us know.
2. I didn't worry about whether the layers selected to run a tool on were set as specifically Selectable.
3. Ran the tools on test feature classes in a File Geodatabase. Did not try them on Versioned data.
Also, the bane of all software development, a feature request Is there a way to change the default location the output feature classes get written to? At the moment the seem to be going to a new geodatabase added to the C: drive. Not a critical request, but it would be nice to be able to save it to a few levels further out in the C: drive.
Looking good,
This is what I am currently working on.
I am still trying to figure out how I can force the user to only choose a folder and not anything else.
Do you have access to the os module?
Not sure how you get this to work within the dialog but could throw an error message and force retry if they don't select a directory?
import osif os.path.isdir(v_path): return Trueelse: return False
import os
if os.path.isdir(v_path):
return True
else:
return False
Anthony,
I am using the OpenDialog module found here: The pythonaddins module—Help | ArcGIS Desktop
I also have access to the os module. I am still trying to figure out the filter option.
I was able to figure it out, thanks!
Nice, the OpenDialog module looks really handy.
I'm sure I can use that for a few things here!
HeatherW You can download latest version, which allows to dictate scratch workspace folder. Let me know how it works.
Awesome, thanks. I will try it out.
Also, I just want to throw this out there for other cross-jurisdictional public safety data people - I did a script tool that finds polylines at jurisdictional boundaries that aren't snapped to agreed-upon snap points, such as in this image:
The code is at Data integration – on the edge – GIS Hacker & Hiker, and uses "disjoint" to create an error feature class of points where endpoints aren't snapped.
Thanks for sharing Heather! In the future I wanted to add a button to check that streets are broken at Jurisdiction boundaries.
Just downloaded the latest version. I like the Intersections Error tool. In my case, many errors are not really errors, but freeway overpasses and underpasses. Tim and I chatted on the phone and one idea I had was to be able to rebuild just the visable portion of the scratch topology, just so I can keep track of what I've fixed.
However, since Tim is gracious enough to provide the errors as a point feature class there really a need to over complicate things. With the IntersetErrors point feature class, I symbolize them based on the Exception attribute. As I work on the my streets, I simply calc Exception = 1 as I fix the error and move on. I can also select those error points that spatially fall on a freeway and do the same calculation....
ETA: Below you can see the basic outline of the freeways in the Salt lake Valley:
Tim Witt
Thanks for sharing!
I just updated it again. I have also added a latest update line to the original post.
cdspatial can you try the latest 10.1 version? Should be with scratch workspace and error messages.
OK, I'll give it a try.
Tim Witt I have not downloaded or tested your addin yet (although it looks really helpful), but before I start down the "validate topology in <multiple> extent" scripting road, I thought I'd ask if you already have one. I'm testing the use of a two-way replica to a SQL Express personal SDE (also tried checkout to fgdb), but it (both) cause the entire area to be dirty, which takes 2+ hours to validate...then ~3k errors need to be marked as exceptions. Doin the entire state/dirty-area at once, with the personal SDE, crashed after 2 hr 10 min yesterday, but breaking it up worked (my guess it hit a limit somewhere).
I should be able to figure out the code to change extent, validate, repeat...but thought I'd ask if you have that already in your workflow.
Modify the wheel vs reinventing.
edit: BTW - I have downloaded now and installed now.
Rebecca,
at the moment it uses the whole street network and it is very memory heavy on street networks 50k+. I am still trying to figure out how I could use the extend instead of the while feature.
Installed the new tool and ran it. Some tools ran fine, others had issues. Some of this may be due to the older version of ArcGIS used.
Here's the results on test data in a File Geodatabase using ArcGIS Desktop 10.2.1:
Check for Overlaps function:
- overlap_polys output correctly identified polygon overlaps in a parcel test dataset.
- overlap_Topology output also found the issues correctly.
- OverlapErrors_point and OverlapErros_line outputs had no results (they showed up in the Table of Contents, but I'm not sure if they are used as part of the "Check for Overlaps" function.
Check for Gaps function:
- GapErrors_poly output was empty/did not find the gaps in a parcel test dataset.
- gap_Topology output did find the gaps correctly.
- GapErrors_point output was an empty table/did not find gaps.
- GapErrors_line found all the gap issues and output them as lines.
Check Line Segment Dangle function:
- YourDangleErrors output correctly found dangles at distances of 0.1 foot and 1 foot in street centerline test dataset. Did not 4 other Dangles present (35'+).
Check Line Segments Overlap function:
- intersect_Topology output correctly showed overlapping lines when run on a test street dataset.
- IntersectErrors_point output was an empty table/did not find overlap.
- IntersectErrors_line output did find the overlaps.
- IntersectionErrors_poly output was an empty table/did not find overlaps. Also, I'm curious as to how this output would be used?
Scratch Workspace function:
- Works. I was able to switch the folder location for the Scratch workspace and the other functions then output the results there.
mmmm, yummie street data......
Rebecca- I'm curious as to the use of the topology in your personal SDE and/or check out replica in a FGDB.
Do you have a topology that involves various feature classes like 'polygon boundaries must be covered by street centerlines'? Or are you simply checking for overlaps and dangles of single feature classes [as I do]? If the latter, as best I can tell Tim's add-in is the ticket as it allows you to check simple topologies (single feature class to itself) in an enterprise gdb without the typical overhead. I've run it several times in the past few days on my SQL enterprise geodatabase, made the appropriate edits and then synced to my numerous FGDBs successfully. I only do one-way from EGDB to FGDB, and I suspect your workflow may be considerably more complex than mine.
Tim- I haven't really noticed any performance hit with my centerlines (57K +- records).
Rebecca Strauch, GISP
Thanks for the feedback!!
Looking at it, everything seems to run fine. I am using the export topology errors tool, which seems to create a point/line and polygon feature by default and then adds all of them to the MXD even though some might be empty.
To catch some of those further away dangles, will add a combo box in which the use can decide how many feet it should look for.
Thanks Tim. If I get something thrown together for my purposes, I'll share with you then.
Joe Borgione The topology is part of our master enterprise SDE. It contains is statewide (Alaska) data with three polygons FC, lots of overlap (even within a FC), gaps (i.e. islands) etc.that are exceptions. We use 8 topology rules to mimic and maintain the topology integrity we had back in the coverage days. So when creating a checkout or replica, the topology and 3 FCs all are part of it (by design and needed).
Our current workflow is to edit a version of Default, with SQL 2008 being on a "local" (i.e. fast network) so editing/reconcile/post works great. IT is wanting to setup/move the new SQL 2014 server to a "remote" site (i.e. slow connection) where editing like tracing, splitting, moving vertices, etc., will not work with the current workflow. So I am testing check-out and two-way replications to a local drive so edits go faster. But as mentioned, the full extent of the replica will always be dirty when created. With the two-way replica we could sync multiple times, i.e. not have to validate with every post (as a checkout would be). We've discussed taking portions of the extent, but with our typical editing workflow, that wouldn't help us. I also would want to get everything back to Default, no versions, etc. at least once a month (I like state 0), and then start it all again.
I'm not sure that Tim's tool will work or help in our process any, but never hurts to take a look. Anything that makes the process easy get an A+ in my book.
After some testing with jborgion i realized that an Advanced license is needed for the Dangle tool. I will see if I can figure out how to do it with a lower level license.
Even if you can't Tim, it's not a show stopper for me. It all goes back to the fact that the tool does create various feature classes that are very useful, even with a standard license. Basically the tool considers dangles where there is 15' or less gap between street segments. It creates a buffer feature class which is available to the standard license. (See below) The attribute table of those buffers include all the data from the streets it intersects. In my case I found 321 buffers, which translates to 321 legitimate (= > 15') dangles. (Not too bad with a 57,000 record feature class of roads...)
The way I'm going about fixing them is city by city: First select a city polygon and then do spatial selection to find those buffers that intersect that selected city. And just start zooming to the selected features. I added a field called FIXED inthe buffer attribute, and when I fix the dangle error, I calc FIXED = 1 and move on....
timw1984
It will now work with ArcGIS Desktop Standard.
Hi Tim! This tool look great so far. So easy to use. Will the link in your initial posting go to the latest version of the addin? If not where shall I go to download it? Thanks!
Yes the link goes to the latest version.
Since it seems to be in a stable condition, I might create a document instead of using the guinea pig thread.
Fun fact jborgion , apparently you can use the select tool and select a couple of streets and then run the dangle tool on just those streets (you still need to select the street layer in your table of contents).
That's cool Tim; just tried it. Before running the tool I created the dangle that was subsequently found. It's the only one in the YourDangleErrors point feature class:
This is great feature for me; I can run it just on streets that are newly added and get them fixed asap. Thanks!
ETA: here is a perfect example. Notice the M_DATE value (modified date) of the street that has the dangle...
timw1984 I would like to demo this tool to my integration group in a couple of weeks. Do you mind?
Go ahead Heather and let me know how it went! I have created a document with the latest download here https://community.esri.com/docs/DOC-9983-topology-check-python-addin This download also includes a readme file, which has pretty pictures and explanations
That just reminds me how I hate creating or modifying streets!
Just hire this guy to do it for you!
jborgion
Great! Will do. One suggestion on the documentation is to add in your assumptions - like the 15 ft distance for dangles if that's what it is. I like your idea of adding a user-defined distance in a future version!
Heather- I think you're going to like this tool...
JB
HeatherW
Anyone test this with 10.5?
Heather tested it with 10.4.1, I think this was the highest. I don't see any reason why it wouldn't run in 10.5.
Hi. I'm new here. Getting over many hurdles of learning ArcGIS and incorporating Python. So much better once I added pandas and a few other modules to the old barebones version of (2.7) Python that came with the 10.3 release. (Was on 10.1 but was forced to upgrade to 10.3 when geocoding stopped working.)
I love to test new features, but always want to see the source code first. Is there a central github or other repository where people put their code? I see above some links to individual's blogs. Is there also a central repository?
That is a good idea, I will have to do that.
Tim, any way you could post or send me the source code (if you're not ready to post)? I would love to be able to explain it in detail to my group on Wednesday. heatherw@sanmiguelcountyco.gov
Thanks, and thanks again for developing and sharing such a great tool!
Heather... did you already look https://community.esri.com/docs/DOC-9983-topology-check-python-addin you asked a couple weeks ago so you may have found it by now.
Heather Widlund I made an updated version with dangle tolerance https://community.esri.com/docs/DOC-9983-topology-check-python-addin
Check it out
Thank you - I will pass it on!
Tim -
Just a note of thanks for the tool and its updates, from a 9-1-1 GIS cohort of Heather Widlund.
Joe Borgione - it's been a long time since you visited us for Spillman in Montrose, CO. The PD did eventually upgrade to a geobase on our regional GIS data.
Joe Borgione Chris Donohue, GISP Heather Widlund Thanks for all your input! The addin will be in an article in this years ArcUser summer edition! http://www.esri.com/~/media/Files/Pdfs/news/arcuser/0617/new-ways-to-work.pdf
If I can suggest it, there is one more bit of functionality that I've seen in other tools that could be added to really make this rock. How about adding an icon to the toolbar with the mouseover of "Buy Tim a drink" and the related functionality to allow users to make that happen. Of course, you would have to make a design choice of your preferred beverage
Thanks for all the coding and the willingness to share it with the community!
Haha, thanks Chris! I need to find a way to change the button from coffee to beer depending on the time of day!
Thoughts on a tool that shows were streets aren't broken at ESZ changes?
TIm- I don't like to break streets mid-block for ESZs, rather I convince the chiefs that Intersections work best for an ESZ edge. Unless of course you have completely different jurisdictions at mid-block, which around here is rare. The thing about mid-block ESZs is there might be a nice house fire just beyond the boundary for station X and they will complain it should be them and not Station Y. But Station X will complain when some senior citizen falls off the toilet in the middle of night and its just inside thier ESZ; "you should have sent station Y, it's theirs!" (Not that I've ever had either experpience...)
I agree Joe, I would love to be able to not break up blocks. The issue is that we have 10+ agencies in my county that have their own fire and police department. not to mention cities just like to annex where ever, which means that they will be responsible for fire and police dispatch.
We have some of the same issues here with Fire and police jurisdictions especially Fire some of these things break in the middle of a field on a particular property. So a tool like that would be helpful for us. BTW where can I snag the latest version of the tool it's been a while since I looked at this thread and I need to do some QC big time.
You can find the latest version here: https://community.esri.com/docs/DOC-9983-topology-check-python-addin
Anybody who wants to test out the newest feature? https://www.dropbox.com/s/i6w2e8dg2d9zygt/TopoAddIn.esriaddin?dl=0
I added a check where you can select a line and polygon feature, and make sure that the line segments break at polygon borders.
Tim- glad to see you've survived the hurricane season thus far!!!!
Yes, I had to work at our EOC, since we are part of Emergency Management and now I am damage assessment mapping.
I figured you were really busy, and still are. Could be a great presentation at next years' UC....
All the best!
Is there a users guide for this somewhere? I'm trying to figure out why the tool is giving me gaps around the borders of my district layers...
There is always a 'gap' to the outside of a polygon feature class when you create a topology. Literally, that's what it is, although it's pretty pointless at the same time....
Hah and I thought I had too much caffeine or something.
I'm glad Joe was able to clear this up.
The download here https://community.esri.com/docs/DOC-9983-topology-check-python-addin includes a readme file.
Přihlášení členové mohou přispívat, sledovat aktualizace a další. Jste tu noví? Zaregistrujte si bezplatný účet.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.