Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I am developing some boundaries in which precision holds the key value.

Using ArcGIS 9.3 I am converting lines to polygons using the "feature to polygon" tool. The lines are accurate but I find gaps in between polygons.

Using GT [=ET?] wizard tools I made slivers and then eliminated them.

However, the problem persists:

  1. some gaps still remains
  2. I lose precision.

As I have a huge number of polygons, solving them manually will take ages & I am running short of time.

Can anyone help me resolving the 2 issues I mentioned, please?

I have no knowledge of programming but I can work in either ArcGIS or Quantum GIS.

Thanks in advance.

share|improve this question
    
@polygeo: thanks. –  Ade'l Feb 25 '13 at 11:11

3 Answers 3

up vote 3 down vote accepted

ok, i think i found the trick! after you gave me your data sample set, my first thought was: What a crap! ;)

Your sample consists of 71 single lines, which partly overlap and have some tiny offsets as well.

i guessed that GRASS would be the way to go, and ... tada .. it isOriginal line layer

so, this is your line data labeled with its feature ids.

If you know how to do it, enable the GRASS-Plugin, create a new mapset and location and such irritating stuff.

Once this is done, follow the directions from my first answer about importing the loaded layer into grass.

Because you have some small offsets, i would e.g. set the threshold for the snapping to 10 meters (or whatever your CRS is, you sent it without prj)

Besides the threshold, you need to check the checkbox above telling about converting lines to boundaries.

After running the command, you can view the resulting line layer, which now has only 36 features.

I didn't get it in the first run and it's not really obvious, but a polygon layer was created within GRASS at the same time.

To get this, go to the GRASS-Toolbox -> "Browser"-Tab -> select your mapset and hit the blue Refresh-Button -> expand the folder and go into "vector" -> mark the polygon sublayer and click the "Add selected map to canvas"-Button.

Your fresh polygons are now in the QGIS canvas. Check the CRS of the layer, cause QGIS/GRASS-Plugin tend to play tricks on you there (in case it is not the right CRS, just change it to that).

Finally, save the layer as shapefile, and you are ready for the rest of your adventure.

At least this sample looks really clean now, but i don't know about the rest of your dataset, so experimenting with values might still be necessary.

pretty polygons

share|improve this answer
    
well, well, well, thx a lot Bernd V. for the effort & help & the time you took out sepcially for this... :) I am getting my hands on to grass now... :) I hope to get it done. :) –  Ade'l Mar 4 '13 at 14:20

I will only cover the part, already having "bad" polygons:

My workflow for cleaning up polygons and gaps which works quite conveniently is importing it into GRASS through the GRASS-plugin in QGIS.

The concept/process of creating a mapset and a location is confusing for novices, and you might have to websearch for guidance, but the result might be worth it. (Maybe this part will get much easier when v.in.ogr and its advanced options will be implemented into SEXTANTE Toolbox one day)

In the GRASS-Toolbox, choose File Management -> Import into GRASS -> Import vector into GRASS -> v.in.ogr.qgis (Import loaded vector)

Select your layer, then "Show advanced options":

Here you can set a threshold for snapping (default -1). If your CRS is in meters, then your units are meters here too. You can also set a threshold for small areas to eliminate during import (default 0.0001)

Now check the errors in your layer and measure some gap distances and areas to get an idea about appropriate thresholds.

While importing, GRASS will snap boundaries to the next vertex and eliminate small areas.

You should maybe iterate through his process (measure gaps, adjust threshold), using small thresholds first, depending on what errors are left in the first run.

Not really sure what you mean by "precision", but i guess that you mean that polygons get distorted during snapping processes. To avoid that, i use Vector -> Geometry tools -> Densify geometries to create a new layer with added extra vertices to add some "fake" extra precision.(experimenting on the right amount necessary too). In the SEXTANTE toolbox, there is new Densify tool also working with new vertices in given intervals.

The snapping processes now have a lot more vertices to choose from, so the polygon alignment should be kept.

After the layer is sufficiently cleaned, you can delete unnecessary vertices by using Vector -> Geometry tools -> Simplify geometries.

Sorry, no "One-Button-Solution", but maybe it helps.

share|improve this answer
    
thx a lot Bernd. Ill definitely try this as nothing else has worked out for me as yet. well, you know I designed these electoral boundaries and some of the boundaries are same as other administrative boundaries. When I convert lines to polygons, I find smaller yet disturbing gaps n when I try to fill them the boundaries do no match!!! there I need precision. –  Ade'l Feb 27 '13 at 11:28
    
if this process will not succeed, you will have to rethink your hole approach i fear. Basically, i wonder where did you get your line features from, and why lines when your goal is to get polygons? Always hard to understand a problem without seeing the underlying data. Good luck! –  Bernd V. Feb 27 '13 at 12:35
    
Hmmm, some of the lines I made, & others I picked from existing data. sure, Ill need your email Id, so that I can share my data with you. :) –  Ade'l Feb 28 '13 at 10:33
    
mhm, could not find an option for personal messages in this system, so (sigh ..) geobernadotte@googlemail.com .But i can't promise anything ;) –  Bernd V. Feb 28 '13 at 15:28
    
Its perfectly alright if you're unable to fix it up dear. Thanks a lot for your time and effort. Please refer to your inbox... :) –  Ade'l Mar 1 '13 at 6:13

You can also do this in ArcGIS by creating a topology within a feature dataset in a geodatabase. This video can walk you through the process. I'm glad to see that there's a way to do it with the open source software, though!

share|improve this answer
1  
HI, thanks Jay, I tried this topology trick, but there are too many slivers as the data set is huge, consisting countrywide + using topology generate precision errors therefore I cannot use that. Methodoly given by @bernd V. seems v.feasible... :) Thanks a lot anyways dear... :) –  Ade'l Mar 4 '13 at 14:23

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.