The GIS Forum
The GIS Forum is a community site for Spatial users to connect and grow

Splitting shapefiles

This post has 39 Replies | 7 Followers

Top 10 Contributor
Male
Posts 63

Ask away....I'm currently in Atlanta and it might be tonight before I answer. How's it going?

Top 25 Contributor
Posts 17

Hello Randy, nice to hear from you again, thank you for that.

This time my problem follows from the earlier one..

Having completed with your help the task of  spliting the shapefiles in batch via modelbuilder and Python, I have now many individual 2D tiles of approx. 10km square each.

Two sets in particular are of interest to me, one contains just the contours of the land, including elevation, the other contains just walking and 4-wheel drive tracks, several tracks per tile in fact, but no elevation.

I have tried, unsuccessfully, for some days now, in spite of much advice on the net on how to go about it, to create elevation profiles for the tracks.

I finally succeeded in doing it manually with the help of a VB script I found in the ArcScript collection, but it only allows me to create one profile at a time and not too reliably either, I think because it was written for ArcMap 9.2 and I have access to 9.3.

I also followed all the instructions found in the Arc help files and elsewhere (e.g. converting the contours to raster or TIN, converting the tracks to 3D, etc..) but I only get a linear elevation profile, in other words I always end up with a straight line of zero elevation when I press the profiler button in the 3D toolbar. I feel totally dumb as so many times I read about this task being elementary and even trivial, but I am completely confused as to why it doesn't work for me. Also I don't know if it is possible to perform this task in batch, via modelbuilder and/or Python.

Any help from you would be, as always, greatly appreciated.

Many thanks and regards,

George

 

Top 25 Contributor
Posts 17

Randy, you are not going to believe this, but just writing to you to explain my problem seems to have cleared my head of several layers of lint and fluff.

I finally found the answer to my problem. I was not following the correct procedure to convert the track lines from 2D to 3D, so that they clearly never acquired the elevation from the underlying contours TIN. Once I fixed that, all flowed beautifully.

I still have one remaining problem however, and that is if there is an equivalent in modelbuilder or Python for the "Create Profile Graph" button in the 3D Analyst toolbar. In other words how can I process in batch, as opposed to manually selecting one or more tracks and  then pressing the button?

Many thanks again,

George

 

 

 

 

Top 10 Contributor
Male
Posts 63

Hey - Hadn't forgot you - I'm digging around in 3d analyst now looking for an answer. I had a fatal laptop experience this weekend that I just resolved.

Top 25 Contributor
Posts 17

Thanks Randy for letting me know, I am glad you overcame your "fatal laptop experience", I am still stuck with using the profiler button, I coudn't find any automated alternative, anywhere, even searching with Google, but I'll wait for your final verdict with great hopes.

Cheers

George

Top 10 Contributor
Male
Posts 63

Hey - sorry for the length of time or the reply. I believe I am starting to experience what is being called "growing pains" as a business. I fell like I'm being pecked to death by ducks....and not the fun ducks - or fun problems. The not so fun ones. 

The answer seems to be a VB one - and not a model builder one. It appears you can use the ISurface:getlineofSight to generate a profile if you have a series of lines.

Of course now the question is how to loop though what you have and generate these. Let me see.....

Top 25 Contributor
Posts 17

Hi Randy, thank you for persevering. I'll explore your solution and see if I can find a Python equivalent, I am not too good with VB. (not that my Python is that great either...). As for the loop, I think I can cope with that, I have only one line per file, no need for a loop for the lines, just for the list of files via the ubiquitous gp.ListFeatureClasses with which I am already familiar.

Thanks again for your help (and all the best with your ducks).

George

 

 

Top 200 Contributor
Male
Posts 2

well i guess if you can querry the attribute table and seperate then using a parameter like area or zone then creating layers off the selection then export as shape files. hope it could be of help

Top 25 Contributor
Posts 17

thank you, but how can I create an elevation profile, using Python, from the new shapefile? The line of sight suggestion from Randy unfortunately turned out to be not exacly the same as an elevation profile, unless I am missing something (which is always a distinct possibility)

Top 10 Contributor
Male
Posts 58

Recent builds of QuantumGIS will do a profile with a couple of clicks.

I have an existential map:  It has 'you are here' written all over it.

Page 3 of 3 (40 items) < Previous 1 2 3 | RSS
Bookmark and Share
Creative Commons License

PLEASE SEE THE THE LICENSE FROM THE ORIGINAL SOURCE FOR ALL POSTS PULLED INTO THE COMMUNITY MASHUP BLOG SECTION