Jump to content

 
Photo

Reducing # of vertices & nodes - follow up

- - - - -

  • Please log in to reply
5 replies to this topic

#1
jbl

jbl

    Contributor

  • Validated Member
  • PipPip
  • 27 posts
  • Location:JoCo_KS
  • United States

In my last message about this I recieved help and solved the problem by merging features along the same path.
I was left with the problem of wanting to re-sort the features in a DBF table of a shape file, by the feature name. The default is by FID number.

The output is exported as an.ai file for Illustrator and I wanted to have the paths sorted in some fashion to be easier to locate in the layer pallet.

I was able to do so by editing the table from within ArcGis desktop using the following manual method. (Illustrated gif image attached to this message).

I figure that if it can be done manually then there must be some way to automate this, any help or advice would be appreciated.

While this method is simple it is time consuming, so I would only use it under certain circumstances.

Sort the table by feature name then copy top feature in the table (using Edit from the main menu, not mouse or CTRL+C & CTRL+V) and then paste. Duplicate feature is placed at bottom of table with FID number higher than previous highest FID.

Delete the origional feature from the top of the table.

After doing this for all features, they are now sorted alphabetically and the FID is sorted so as the lowest FID is attached to the correct reature name.

After stopping the editing session and saving edits, new FID numbers are assingned to the features but they still are arranged so that the lowest FID is asigned to the lowest alpha feature name (31st) and the highest FID is assigned to the highest alpha feature name (Washington)

After the file has been exported as an .ai file and opened in Illustrator, the path labels merely say <Path>. But after locating them and identifying them, I named these and they are sorted alphabetically, ascending (as Illustrator does)

Thanks
jbl

Attached Files



#2
Hans van der Maarel

Hans van der Maarel

    CartoTalk Editor-in-Chief

  • Admin
  • PipPipPipPipPipPipPip
  • 3,900 posts
  • Gender:Male
  • Location:The Netherlands
  • Interests:Cartography, GIS, history, popular science, music.
  • Netherlands

Not familiar with Arc myself, but can't you simply sort on the feature name? It's definately possible in FME...

This seems like a working solution, but as soon as you get more than a dozen features it'll get very tedious and consequently error-prone.
Hans van der Maarel - Cartotalk Editor
Red Geographics
Email: hans@redgeographics.com / Twitter: @redgeographics

#3
jbl

jbl

    Contributor

  • Validated Member
  • PipPip
  • 27 posts
  • Location:JoCo_KS
  • United States

The DBF tables in ArcGis default to FID number (that is the sort key that the database uses).
You can sort the table by any field, for viewing but when exporting the file to Illustrator, the FID number is essentially the record number. The DBF file alone has no spatial reference, the other associated files are for that. If the DBF file is edited outside of ArcGis, the .shp file is no longer usable.

And it is true that without some sort of automation, it is definitely for small files, or the need for sorting would have to be great.

jbl

#4
Unit Seven

Unit Seven

    Legendary Contributor

  • Moderator
  • PipPipPipPipPip
  • 266 posts
  • Gender:Male
  • Location:New Zealand
  • New Zealand

Seconded for FME.

Don't know how much of this you have to do or if you don't have another use for FME this could be worth paying someone to setup and run for you if doing on a regular basis. It's a pretty simple process once the FME workbench setup. Id imagine to keep it simple and as you would supply a shp file with an additional field something like sort_seq or draw_seq and an FME user could run the shpfile in and out of the workbench for you.

Are you copying and pasting the names into Illy or do you have some form of automation to get them back in? Imagine if you could automate at the Illustrator end then order wouyldn't be a problem and could be a better use of resources setting up the automation there for this job.

Just ideas.
S a m B r o w n

U N I T S E V E N
unit.seven@gmail.com

Miramar, Wellington
N E W Z E A L A N D

#5
Unit Seven

Unit Seven

    Legendary Contributor

  • Moderator
  • PipPipPipPipPip
  • 266 posts
  • Gender:Male
  • Location:New Zealand
  • New Zealand

Oh and yes you can sort the table view by feature name (or any other field) but the draw order the same as with most programs is the order they appear in the file.

But I have just thought of how you can do this but will really kill your drawing performance with lots of features so I would only do at the last step before export.
  • Go to layer properties > symbology
  • Choose categories > unique values
  • Make Value Field equal NAME (or whatever field you want to draw sorted.
  • Hit the Add All Values button
They should now all be added to your ToC in ascending order. If you click on the column header Value you can reverse sorthing and if you have moved any up or down you also have options to reset sorting. So you now have all the roads added you can right click to set properties for all symbols to make them all look the same. Now we need to draw in this order.
  • From this same tab choose Advanced > symbol levels
  • Check "Draw this layer using the symbol levels specified below"
  • This should now draw the layer in the order we set in the ToC.
Hope this helps—it should do what you want but if you are doing a large number you may want to think about putting this in a geodatabase and indexing the name layer to get some performance.

Cheers,

Sam.
S a m B r o w n

U N I T S E V E N
unit.seven@gmail.com

Miramar, Wellington
N E W Z E A L A N D

#6
jbl

jbl

    Contributor

  • Validated Member
  • PipPip
  • 27 posts
  • Location:JoCo_KS
  • United States

Thanks Sam, I believe that your method is exactly what I was looking for. I just tried it and it is somewhat faster than the method that I suggested.
I have a base layer of all major street features of a metro area (appx 17,000 features). From this layer I make a new layer for each individual city bus route. In these bus route layers I merge as many features as I can using Editor > Merge. ie... 1 continous street that may have 80-100 individual features in the base layer would be reduced to 1 feature in the route layer. So on an individual route I am dealing with 15-30 features total.

Without a specific reason this would just be a lot of extra work, but:
The map (base street map and 80 bus routes) will be used for quite some time (years). Streets will change on the base map. Bus routes will be changed. Routes will be added or deleted.

I may or not be the one to be doing these changes. I just feel that adding these text labels to the street paths in the Illustrator Layer pallet will make things a lot easier for changes years from now.

Thanks again
jbl




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

-->