Jump to content

 
Photo

Simplifying river data

- - - - -

  • Please log in to reply
19 replies to this topic

#1
David Medeiros

David Medeiros

    Hall of Fame

  • Validated Member
  • PipPipPipPipPipPipPip
  • 1,069 posts
  • Gender:Male
  • Location:Redwood City CA
  • Interests:Cartography, wood working, wooden boats, fishing, camping, overland travel, exploring.
  • United States

I'm back to working on the SRWP watershed atlas. Work involves importing NHD flow-line data into AI via MAPublisher. The layer is immense with every river, stream and creek shown in great detail. My first step in working with this data is to clean it up, reduce the number of anchor points and convert the segmented geometry to smooth bezier curves. I've been using the AI Path> Simplify command at 99% or 98% with some success, but overall I'm not happy with the results and would like to know if any one has some tips or tricks for working with data like this?

In particular I'm wondering if there is a way to automatically get rid of kick backs?

David

Attached Files


GIS Reference and Instruction Specialist, Stanford Geospatial Center.

 

www.mapbliss.com

 


#2
sitesatlas

sitesatlas

    Master Contributor

  • Validated Member
  • PipPipPipPip
  • 182 posts
  • Gender:Male
  • Location:Madrid, Spain
  • Spain

You might want to try the simplify command in MAPublisher, instead of the Illustrator one. The advantage with the Simplify Lines function in MAPublisher is that you can precisely control the amount of simplification in either document or real units, and it also preserves common edges and nodes. The only thing is that it creates straight line segments, not Bezier curves, so you'd probably have to use a very small tolerance.

One of the Illustrator plug-ins from the Institute of Cartography is called Line to Bezier. It might be worth experimenting with that in combination with the Simplify Lines function.
Michael Borop
World Sites Atlas
http://www.sitesatlas.com

#3
David Medeiros

David Medeiros

    Hall of Fame

  • Validated Member
  • PipPipPipPipPipPipPip
  • 1,069 posts
  • Gender:Male
  • Location:Redwood City CA
  • Interests:Cartography, wood working, wooden boats, fishing, camping, overland travel, exploring.
  • United States

You might want to try the simplify command in MAPublisher, instead of the Illustrator one. The advantage with the Simplify Lines function in MAPublisher is that you can precisely control the amount of simplification in either document or real units, and it also preserves common edges and nodes. The only thing is that it creates straight line segments, not Bezier curves, so you'd probably have to use a very small tolerance.

One of the Illustrator plug-ins from the Institute of Cartography is called Line to Bezier. It might be worth experimenting with that in combination with the Simplify Lines function.


Thanks sitesatlas,

I have used the MAPublisher Simplify command but it gave me poor results with this data. It seems to produce more kinks in the line and overall a line that is less representative of the original data. Even using both simplify commands together seemed worse than just the AI simplify.

Looking over the results I think the basic simplify at 98% gives pretty good results for most of the data, I'm just not happy with the leftover parts that kink or have kick backs in the line work. Some of this may be a function of not applying my join tolerances correctly as well, leaving some of my lines broken where they should be one.

GIS Reference and Instruction Specialist, Stanford Geospatial Center.

 

www.mapbliss.com

 


#4
EJHutzler

EJHutzler

    Newbie

  • Validated Member
  • Pip
  • 4 posts
  • Switzerland

Perhaps you get help by following plugins: (www.ika.ethz.ch/plugins/index.html)
Point Elimination (excl. Nodes) documented in <http://www.ika.ethz....mentation.html> Beispiel 2 (example 2)
and then
Line to Bezier documented in <http://www.ika.ethz....hreibungen.pdf> page 15

ejhutzler


I'm back to working on the SRWP watershed atlas. Work involves importing NHD flow-line data into AI via MAPublisher. The layer is immense with every river, stream and creek shown in great detail. My first step in working with this data is to clean it up, reduce the number of anchor points and convert the segmented geometry to smooth bezier curves. I've been using the AI Path> Simplify command at 99% or 98% with some success, but overall I'm not happy with the results and would like to know if any one has some tips or tricks for working with data like this?

In particular I'm wondering if there is a way to automatically get rid of kick backs?

David



#5
David Medeiros

David Medeiros

    Hall of Fame

  • Validated Member
  • PipPipPipPipPipPipPip
  • 1,069 posts
  • Gender:Male
  • Location:Redwood City CA
  • Interests:Cartography, wood working, wooden boats, fishing, camping, overland travel, exploring.
  • United States

Perhaps you get help by following plugins: (www.ika.ethz.ch/plugins/index.html)
Point Elimination (excl. Nodes) documented in <http://www.ika.ethz....mentation.html> Beispiel 2 (example 2)
and then
Line to Bezier documented in <http://www.ika.ethz....hreibungen.pdf> page 15

ejhutzler


I'm back to working on the SRWP watershed atlas. Work involves importing NHD flow-line data into AI via MAPublisher. The layer is immense with every river, stream and creek shown in great detail. My first step in working with this data is to clean it up, reduce the number of anchor points and convert the segmented geometry to smooth bezier curves. I've been using the AI Path> Simplify command at 99% or 98% with some success, but overall I'm not happy with the results and would like to know if any one has some tips or tricks for working with data like this?

In particular I'm wondering if there is a way to automatically get rid of kick backs?

David


Thanks, but I'm on a Mac and I believe those are PC only plugins.

GIS Reference and Instruction Specialist, Stanford Geospatial Center.

 

www.mapbliss.com

 


#6
Charles Syrett

Charles Syrett

    Ultimate Contributor

  • Validated Member
  • PipPipPipPipPipPip
  • 537 posts
  • Canada

Have you tried MapShaper to edit the shapefiles first, before going into Illy? I've had pretty good results from it.

Charles Syrett
Map Graphics
http://www.mapgraphics.com

I'm back to working on the SRWP watershed atlas. Work involves importing NHD flow-line data into AI via MAPublisher. The layer is immense with every river, stream and creek shown in great detail. My first step in working with this data is to clean it up, reduce the number of anchor points and convert the segmented geometry to smooth bezier curves. I've been using the AI Path> Simplify command at 99% or 98% with some success, but overall I'm not happy with the results and would like to know if any one has some tips or tricks for working with data like this?

In particular I'm wondering if there is a way to automatically get rid of kick backs?

David



#7
MapMedia

MapMedia

    Hall of Fame

  • Validated Member
  • PipPipPipPipPipPipPip
  • 1,029 posts
  • Gender:Male
  • Location:Davis, California
  • United States

If you are using ArcMap you gen use the generalization function.
Also, if you are using a hillshade be sure your new hydro fits the relief - you may have to modify the original DEM (i.e. burn rivers into DEM) then create hillshade(s).

#8
razornole

razornole

    Legendary Contributor

  • Validated Member
  • PipPipPipPipPip
  • 450 posts
  • Gender:Male
  • Location:Ozark Plateau, Arkansas
  • Interests:Photography, Cartography, Down-river canoeing, Backpacking, Cross country biking, Geomorphology, Ornithology, Ecology, Quaternary, and last but first; drinking beer on the beach.
  • United States

Hello David,

I use the simplify path at about 98% on my NHD data in Illy, and then I use the Swiss' Institute of Cartography plug-in "Improve Beziers and Lines". It gets rid of the jagged, angular points (kick-backs?).

kru
"Ah, to see the world with the eyes of the gods is geography--to know cities and tribes, mountains and rivers, earth and sea, this is our gift."
Strabo 22AD

#9
David Medeiros

David Medeiros

    Hall of Fame

  • Validated Member
  • PipPipPipPipPipPipPip
  • 1,069 posts
  • Gender:Male
  • Location:Redwood City CA
  • Interests:Cartography, wood working, wooden boats, fishing, camping, overland travel, exploring.
  • United States

Hello David,

I use the simplify path at about 98% on my NHD data in Illy, and then I use the Swiss' Institute of Cartography plug-in "Improve Beziers and Lines". It gets rid of the jagged, angular points (kick-backs?).

kru


I use the AI simplify at 99% or 98% as well and it usually works out just fine. I can get rid of the angled joins by switching from a miter join to a round join in the strokes palette. There aren't many kick-backs (when the handles of a curve spline are looped backwards) and they are hard to see anyway. But as I'm trying to apply an effect to my lines, namely using a taper brush for progressively thinning streams, I see all sorts of gaps and slivers along the path at each join or anchor point. The more I play with it the more I think this may be an issue with how I'm doing the line taper and not the lines themselves. I may post separately on how to achieve the tapered line effect. Alternatively I can separate the NHD data into different flow rated selections and apply an different line thicknesses without tapers.

On the Swiss' Institute of Cartography plug-in's, I think these are PC only? And I'm on a Mac.

GIS Reference and Instruction Specialist, Stanford Geospatial Center.

 

www.mapbliss.com

 


#10
razornole

razornole

    Legendary Contributor

  • Validated Member
  • PipPipPipPipPip
  • 450 posts
  • Gender:Male
  • Location:Ozark Plateau, Arkansas
  • Interests:Photography, Cartography, Down-river canoeing, Backpacking, Cross country biking, Geomorphology, Ornithology, Ecology, Quaternary, and last but first; drinking beer on the beach.
  • United States

Hey David,

I'm not familiar with the taper effect, I just use the Horton stream order to apply different line widths to my streams. I'm sure there are others on the site who are familiar with taper. Improve Bezier and Lines does in fact get rid of the kick-backs (I didn't know that is what they were called). Unfortunately, you're right, they don't have the filters for Macs.

The taper effects sounds as if it is having issue with the lines not being joined. Have you tried using JET scripts. I believe they are written for both PC and Macs. I have successfully used the JoinNearest to join my NHD data, however, it took some playing around (I know there is a max amount of segments it can do at a time). Here's the link

http://www.illustrat...PathScripts.htm

Good luck,

kru
"Ah, to see the world with the eyes of the gods is geography--to know cities and tribes, mountains and rivers, earth and sea, this is our gift."
Strabo 22AD

#11
David Medeiros

David Medeiros

    Hall of Fame

  • Validated Member
  • PipPipPipPipPipPipPip
  • 1,069 posts
  • Gender:Male
  • Location:Redwood City CA
  • Interests:Cartography, wood working, wooden boats, fishing, camping, overland travel, exploring.
  • United States

Kru,

The lines are joined, usually before applying my simplify command. I use MAPublisher’s join command, works great. Kick-back may not be the correct term, but its how they were referred to by one of my GIS instructors and it seems to be a good description of the problem.

Line tapering is something I learned about from Tom Patterson’s Shaded Relief site. It’s the similar to applying the Horton stream order with line thickness but uses a gradually tapering line instead of abrupt breaks in line width. See link below. Illustrator allows you to create a custom tapered brush that you can apply to the lines in order to get the desired effect, but I’m having a hard time getting it to work. This is, I believe, how Tom does it on his hydrology, maybe we could get him to do a CartoTalk workshop on the technique!

Are you manually applying your stream widths or have you found an attribute in the NHD data that allows you to select reaches by their stream order?

Stream tapers: http://www.cartotalk...p...20&hl=taper

GIS Reference and Instruction Specialist, Stanford Geospatial Center.

 

www.mapbliss.com

 


#12
razornole

razornole

    Legendary Contributor

  • Validated Member
  • PipPipPipPipPip
  • 450 posts
  • Gender:Male
  • Location:Ozark Plateau, Arkansas
  • Interests:Photography, Cartography, Down-river canoeing, Backpacking, Cross country biking, Geomorphology, Ornithology, Ecology, Quaternary, and last but first; drinking beer on the beach.
  • United States

Hey David,

Unfortunately for me it is a manual selection process. A process that takes me about an hour for a document that is 28x36 with a high resolution NHD file. I don't notice abrupt changes in the line weight, but I am only making small incremental differences (.25pt per order).

Attached is small portion of a document that I recently made. (Glad I did this b/c I just noticed a mistake), Red are first order, Purple are 2nd, Orange 3rd, and blue is forth. I don't go larger then forth, at that point it is usually a waterbody anyways.

kru

Attached Files


"Ah, to see the world with the eyes of the gods is geography--to know cities and tribes, mountains and rivers, earth and sea, this is our gift."
Strabo 22AD

#13
Garvan

Garvan

    Contributor

  • Validated Member
  • PipPip
  • 12 posts
  • Location:Toronto
  • Canada

Hi David,
Sometimes a final processing with Effect > Stylize > Round Corners with a small radius is required, as both MAPublisher's and AI's simplification algorithms can preserve jagged corners (athough you may already be getting a similar result by switching the stroke join to rounded)

MAPublisher uses Douglas-Peucker simplification, MapShaper offers 2 other simpification algorithms, although I'm not sure if it would provide better results.

Could you draw (or describe) your expected result post-simplification? I'm not clear from your graphic what the problems are.

Cheers,
Garvan.
Garvan Keeley
Software Development Manager
Avenza Systems Inc.

#14
David Medeiros

David Medeiros

    Hall of Fame

  • Validated Member
  • PipPipPipPipPipPipPip
  • 1,069 posts
  • Gender:Male
  • Location:Redwood City CA
  • Interests:Cartography, wood working, wooden boats, fishing, camping, overland travel, exploring.
  • United States

Garvan,

The attached image was just a visual to go along with the description of the two methods I was using for simplification (with and without using the straight line simplification before a standard simp). It doesn’t show any specific issues. I’m back to being happy with my overall approach to joining and simplifying the lines. I’ve determined the real problem is my attempting to use a custom tapered brush on these lines post simplification. I assumed the poor results were related to my line joins and miters but it’s probably that I’m not setting up the brush correctly.

If I get some free time later I’ll post an image of what these lines look like after applying the brush. Although I should probably experiment on my own a bit more before I start a new thread on that topic.

I should add, since I see you are with Avenza, that before posting I deleted a 4th line in that image showing a version where I first simplified through MAPublisher to reduce the number of anchors, then did an AI simplify at 99% to get the bezier curves I want. It was visually very different from the other lines and seemed to create more kinks or odd transitions from one curve to another. I may have been able to play with it to get a better looking line but it wasn't worth the effort. Since MAPub is an AI plugin and the AI simplify is always available, can you explain when I might want to use the MAPub simplify instead? What advantages does it have?

Thanks,
Dave

GIS Reference and Instruction Specialist, Stanford Geospatial Center.

 

www.mapbliss.com

 


#15
Garvan

Garvan

    Contributor

  • Validated Member
  • PipPip
  • 12 posts
  • Location:Toronto
  • Canada

I should add, since I see you are with Avenza, that before posting I deleted a 4th line in that image showing a version where I first simplified through MAPublisher to reduce the number of anchors, then did an AI simplify at 99% to get the bezier curves I want. It was visually very different from the other lines and seemed to create more kinks or odd transitions from one curve to another. I may have been able to play with it to get a better looking line but it wasn't worth the effort. Since MAPub is an AI plugin and the AI simplify is always available, can you explain when I might want to use the MAPub simplify instead? What advantages does it have?

Thanks,
Dave


MAPublisher's simplification uses the D-P algo, so anywhere someone would want to use that algorithm we would come in handy. It does topology maintenance on area data (as long as the neighbor areas have shared vertices). It can be run repeatedly with the same parameters and no further simplification, so you can take huge datasets and simplify chunks without concern that data is being simplified twice. Other than that, is it up to the user to determine what is optimal for their need (point reduction vs. accuracy, smoothness vs. maintain extremes, etc.). I just took a look at some our test data where we compare our simplification to Illustrator's. On our test data (a variety of road network, river data, contour lines), when doing a 50% vertex reduction, our straight line simplification produces much better results than Illustrator's straight line simplification. However, using Illustrator's bezier line simplification, one can produce accurate lines with 70% or higher vertex reduction on our data sets. If you don't need straight line simplification (such as with rivers and contour lines), I would use your approach.
Garvan Keeley
Software Development Manager
Avenza Systems Inc.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

-->