• Skip to primary navigation
  • Skip to main content

North River Geographic Systems Inc

Spatial Problem Solving

  • Home
  • About NRGS
  • Blog
  • Resources
    • Guides for using TN Data with QGIS
    • QGIS Resources
    • Tutorials
  • Services
    • Support Services
    • Tennessee NG911 Address Server
    • Training
    • Forestry Database Services
    • Conservation GIS
    • Data Analysis
  • Portfolio
  • Show Search
Hide Search

ArcGIS Desktop

A Tale of Two Topologies

rjhale · May 16, 2015 ·

It was the best of times, it was the worst of times, it was the age of wisdom, it was the age of foolishness, it was the epoch of belief, it was the epoch of incredulity, it was the season of FOSS4G, it was the season of Commercial Software, it was the spring of hope, it was the winter of despair, we had everything before us for the right price, we had nothing before us because we didn’t RTFM.

My apologies to Charles Dickens. My compliments to the guillotine.

To say that this dataset had some miles on it is an understatement.  It had been a shapefile. It had become a geodatabase. It went back to shapefiles. It became 4, 16, 80+ shapefiles, and has now been moved to PostGIS and I’m down to 20+ tables plus a lot of Foreign Keys. Why? Well – I upgraded a client from ArcView (I know it’s not called that) to QGIS/PostGIS. Why is it an upgrade to Free Software? Because we have more functionality and much much better data. I’ve talked about these guys before – and I have some posts I’ve left hanging but now we talk about topology.

This data in all of it’s changing and moving had developed some problems. I will accept full blame for the problems developing because I’m better than this data looked. Last year I made the choice to abandon shapefiles and learn postgis so the last jump was made and it has made everyone’s life much better. Don’t tell my client but I tell them it takes a day to prep the data for delivery to their client – it really only takes an hour now (it used to take 24 hours) – and in those extra hours I clean up the data. No one has noticed, but me, of the problems with gaps and overlaps and zero area polygons. I like clean data. I guess I am a dying breed that still thinks the data is the most important thing and not having all your data sitting exposed in all of it’s terribleness out in some online story map thing.

For kicks last week I started on the topological errors and the first thing I did was read up on PostGIS topology. I started. I failed miserably due to some error that made no sense and I gave up. It’s on my list. I will “get it” eventually – and I was close this time. Really Close.

So for my next trick I pulled up QGIS and looked:

qgis_topo

For those of you that don’t know – shapefiles aren’t a topological dataset. It’s easy to get things in a mess if you aren’t careful. QGIS can check shapefiles for topological rules (Arcview can’t last time I checked – license issue). In this case I was checking for gaps. What I see is a lot of red that are problems from GPS data and problems that appeared when I pulled this dataset apart two years ago and recombined it to fix another problem.

So what do I do to fix it?

Well – for fun I pulled it into ArcGIS. I dumped my data out back into a shapefile (shudder) and imported it into a file based geodatabase. I built topology (I’ve got ArcINFO – and I know it’s not called that anymore) and the topology build removed all the errors in about 15 to 20 seconds. I know – I’m mentioning ArcGIS as a solution. Hey – it worked.

arcgis_topo

BUT – I’ve switched my client to QGIS and PostGIS – do I really want to fall back to ESRI as a fix? No – I’m going to make this work with the tools my client has available.

So I started reading up on GRASS. You get GRASS when you install QGIS. Right now I think it’s GRASS 7 (or at least on my machine it’s Grass 7) and GRASS has this wonderful 30 year run. Yes – the software has been around for 30+ years. GRASS is one of those things that if you ask someone you first get 1. A Drug reference and 2. I used it in College once with another Drug Reference. Of course it’s 2015 and with the number of colleges flailing with GIS you’re not even getting a 2 anymore. Just glassy eyed stares of “Well I made a Story map”.

Grass 7 is really – for lack of a better word – pretty now…or nicer. I’m not sure how to describe it. Grass 6.x always to me was a bit confusing – GRASS 7 isn’t. Maybe it’s me. Maybe not. The user interface is more intuitive – the Help button does just that. It’s not as “mysterious” as it has been in the past. I used it and with a little effort (I need to RTFM more) I was working. It’s powerful. To get QGIS/GRASS/GDAL and all these things in one QGIS install – that’s huge. There’s no excuse for you as a GIS person to not have these packages installed on your computer.

grass

GRASS makes me nostalgic for the old days of Arc Workstation. GRASS datasets are topological. Problem being if you’re using the GUI for import there is no place to set snapping (that I could find). So I imported data and I kept the problems. After reading the manual I did this little command: v.in.ogr /export/data/topo/stands.shp out=stands_snap snap=0.001 and re-imported my data. I had Clean data in about 15 seconds (probably less). What happened is GRASS pulled it in and snapped the data as it was being converted (same as ArcGIS). If you watch the command line you get a lot of information as to what it’s doing.

I checked my ArcGIS software. I checked QGIS. After all this was done I had 10 problems using the topology tools in both softwares with this new clean dataset. 10 problems that took me 10 minutes to fix. Please note I had the exact same problems in ArcGIS and QGIS – no difference.  I took the GRASS snapped data and put it back into PostGIS and I’m done. Clean data now. Happy Clean Data as I invoke my inner Bob Ross.

So what did we learn from all of this:

1. If you aren’t worried about topology as a GIS Person – turn in your badge at the door. If you aren’t worried about your data you’re a terrible person.

2. If you believe you can’t create production professional data using FOSS4G. Turn in your mouse and your half completed GISP application. I took QGIS/PostGIS/GRASS and created a topologically clean production dataset in a little under an hour. My next dataset will probably take about 15 minutes.

3. I failed slightly – I could connect GRASS to PostGIS and I didn’t. I would have avoided the whole “going back to shapefiles” thing again. That won’t happen next time. It’s going to be connected from here on out. It will be pulled into Grass and pushed back into PostGIS.

4. My hope is that I get my topology problems figured out in PostGIS. I’m close.

Anyway – excuse my slight irreverence in this post as I poked a bit. I walked out of a professional meeting the other day where I got the “you only use QGIS because you’re too cheap to buy ArcGIS”. Well……no. So expect the next few posts to dive into a lot of technical as to why this is a good way to work. Plus you get commercial support from a lot of companies while doing it. It’s a good choice. Granted – there are a lot of tools out in GIS land – but picking these tools doesn’t indicate anything about the user or your organization.

Clipping in ArcGIS and Clipping in QGIS

rjhale · Apr 27, 2015 ·

How did I end with this blog post. I’m using QGIS for about 90% of my GIS work these days and I spent about 6 hours digitizing some fairly complicated land cover. Out of that – you get the following…..

It was always one of the things that was hard to explain to someone brand new to GIS: ArcGIS has two clip tools.

  • One tool clips one data layer against another. Example: Clipping all the roads to a county boundary. 
  • One tool clips a polygon layer based on some sort of input be it a line or polygon. It’s found under the Editor Menu on the editor Toolbar. 

If I run into one problem when cleaning up data is polygon overlap. Someone will draw a polygon and then draw another either over it of overlapping it. In classes and with clients I always tell them “Imagine the world is flat like a pancake. In order to get polygon 2 “into” polygon 1 you have to clip/remove that overlapping portion with the editor tool”.

Example:

one

You have a polygon

 

two

 

You add a second polygon partially occluding the first

three

 

You initiate the clip tool on your editor toolbar

 

 

four

 

If I remove the second polygon you can see how the first polygon has been clipped

So where is the clipping tool in QGIS? Well…..there is a duplicate geoprocessing clipping tool. There isn’t a “editing” clip tool built into the core of qgis. Except there are ways of “clipping” that will accomplish the same feat in slightly different ways.

  • If you are digitizing polygons and you want to digitize an interior polygon (lets say put a body of water in a field) you can use the “fill ring” tool to digitize and it instantly clips the big polygon to fit the small polygon. It is found on the Digitizing Toolbar.
  • Clipper plugin. Select the smaller polygon and click the clipper button and it clips.
  • There is another plugin called Digitizing Tools. If you do any amount of digitizing in QGIS I put this one up there with “Needed”.

DigitizingTools

 

  It splits multipolygons. It does all sorts of Trickery with your digitized lines…..and it also clips. It clips against a different layer. A while back I talked about Memory Layers and Scratch Layers.  Well – before I found the clipper plugin I was copying data into memory and running “Cut Polygon with another layer”.   Lets say you have multiple polygons that you want to clip against the big one.

  • Select and Copy them into a Memory Layermemorylayer
  • Delete them out of the original layer
  • Run “Cut polygon with another layer” and that other layer will be the memory layer (defauly layer name is Pasted).
  • Copy and Paste them back in if that’s the end goal.

Example:

digitizingtools
BEFORE
digitizingtoolsafter
After Digitizing Tools

 

Would I want to do this on lots and lots of features? No. This is for digitizing and not geoprocessing and clipping thousands of things against thousands of other things.

Clipper might be able to do this though. The few times I tried I created topology issues so clipper has been to just clip one thing against one other thing. I have always like the clip tool with ArcGIS but it can only run one polygon at once. Is the QGIS way better? Not necessarily. Is the ArcGIS way better? No – it’s just more familiar. Which ever software is your weapon of choice you can do the same feats of GIS trickery.

Is Desktop GIS dead? I still say No.

ArcGIS Training Materials from ESRI.

rjhale · Jan 10, 2015 ·

Out of everything I need to be doing currently….I’ll talk about this for 10 minutes.

In a past life I was an ESRI ATP that quickly morphed into a CTP. Sometime back in 2013 I let all my credentials lapse because as we were told  CTP was only on life support until December 2014. Training in my case had dwindled. It was a great money maker and it gave me the chance to travel some if I was able to get my bids slightly right. One year I made an astounding amount of money doing it. With every franchise you are tied to a corporate entity and training ran it’s course. I morphed business direction and (IMO) became more well rounded. I was quite mad for a while about it. For no good reason really – but still. You work hard to achieve something only to be reminded of the corporate nature of business. It’s business.

During 2011 and parts of 2012 the training regimen was starting to feel more like a sales pitch as opposed to training. You learned about the software ecosystem and at one point we were even installing arcserver to complete desktop tasks and doing a lot to push ArcGIS Online. I look back and am glad it stopped…now. I wished I could arrive at these conclusions quicker. Once again – not that I harbor any ESRI angst. GIS for me is more complicated than one pile of software.

So for those of you not on the twitter…yes it does get distracting but you do learn alot. 

I’ve completely been ignoring Geonet. I’ve been doing more open source things and really anything past the the old ESRI-L list has left me flat. GIS Stackexchange does about all I need for questions and answers these days. Once I started looking at Geonet I’m reminded I need to pay attention to it more just to know. GIS is a never ending career of learning and trying to remain relevant on Tech and the industry.

One tweet latter and I’m look at ArcGIS Desktop 1 . Desktop 2 and 3 are up there also.

It’s not the same Desktop 1 that I taught but it’s up there for free. Which sorta aligns with my ideas about the next version of ArcGIS Desktop. Turn loose the current materials for free. They will still be relevant – but as of right now with Desktop Professional hitting the computers very very very few people will be taking it. It’s a good thing. It’s something I wrestle with on my QGIS desktop class almost daily now.

So enjoy – you’ve got free ArcGIS Training materials released form the source.

Moving a Project from ArcGIS to QGIS: Atlas Part 1

rjhale · Dec 21, 2014 ·

It’s been about a year since this project “appeared” and it was first done in ArcGIS. It wasn’t much fun (not because of ArcGIS). The part that made it “not fun” was the “Oh by the ways”. NRGS would deliver a map and get “Oh by the way can you add the acres for each tree type per property boundary”. OK fixed “Hey – Oh By the way we need only one property per map”. OK. “Ohhhh by the way can you make that yellow a purple”. &^%$*#

So anyway, the best thing in the world is ESRI’s data driven pages. You can set up one map and there’s enough flexibility to churn out a pile of PDF maps. In QGIS you have Atlas – and that’s almost a perfect drop in replacement.

I decided to do a test run on the map. I probably should have done that before spending a ton of time on the template. Luckily this time I know what needs to be done. These things need to be put on a map and they are attribute driven data:

  • Tract Name
  • Tract Number
  • Property Name
  • Acres of the Tract
  • Summary of Acres Per Tract

I made a decision to use the Tract layer (technically a view – but that is coming up later). I set up that layer as an Atlas.

Atlas3

The test run was a bit easier than I thought. The tract Name, Tract Number, Property Name, and Acres are all contained in one of the layers. With Atlas (and Data Drive Pages) you can insert expressions. The expressions are fields from your data. See Screenshot:


atlas2

 

 

So when you preview this in Atlas (excuse the selection box):

atlaspart1

 

With a few expressions I can start filling out parts of my composition……and I hit a problem. Hence the test run.

  • For the sake of simplicity I need to only show one property per map. If you were to view the data you would find that some property is adjacent to other property and there’s not a clean way in either landscape or portrait or with scale to make a property appear by itself on a map.
  • I need to autogenerate acres for each property. There are ways to do this in QGIS…but I don’t want to hand modify each map. There are ways to generate this data in Postgis/Postgres:

freq
So I think we’re halfway there. I’ve got a plan to fix the two problems. There will be some scripts written. Some database “things” done. Stay tuned.

 

NRGS Intro to ArcGIS released CC By SA

rjhale · Dec 10, 2014 ·

In my past life I was a ESRI ATP/CTP. I’ve really been shying away from ArcGIS training. My heart lies in QGIS currently if I have to train or do anything in that arena.

So I had a client call and needed an introduction to arcgis. I’m not officially training anymore for ESRI because that program ended. So I took a bit of time and laid out a one day intro course to help people get up to speed…or at least know what questions they need to ask going forward.

Here are the subjects covered and here is a link to the training page for the class.

  • What is GIS?
  • The Interface
  • Data and Symbology
  • Editing
  • Map Making

Overall it’s not a bad class for a one day affair. It’s still a bit rough around the edges. Teaching is about half performance art. It’s tiring. Especially if you have people intentionally trying to trip you up.  It is a bit silly to build something from scratch when there’s enough ready resources from ESRI Press and a half dozen other people….but it’s “a me kinda class”. It is a lot and if you can get people to talk you can easily burn 8 hours. The last chapter has a “follow along” lesson on building a map.

In keeping with the other classes (and I’m wrestling with the QGIS one) I’m releasing it for free (CC By SA). If you want me to come teach it I can and I’ve got prices listed. If not you can muddle through it. If you have questions you can email me and I’ll help explain. I plan on going back and adding notes to the slides. Yes – it can be a bit cryptic and maybe the “flow” isn’t there – but these classes rely on me/instructor standing in front of people.

If you have suggestions I’ll incorporate it. My goal is to move this to Github for better collaboration. Take it and build something cool.

Anyway – ENJOY!

If you find it even remotely helpful and I saved you some money – make a donation to your local animal shelter.

  • « Go to Previous Page
  • Go to page 1
  • Go to page 2
  • Go to page 3
  • Go to page 4
  • Interim pages omitted …
  • Go to page 7
  • Go to Next Page »

Contact

  • (423) 653-3611
  • info@northrivergeographic.com

Copyright © 2021 · Monochrome Pro on Genesis Framework · WordPress · Log in

  • Home
  • About NRGS
  • Blog
  • Resources
  • Services
  • Portfolio