[Tutor] Help with two .shp file and python coding

Tariq Khasiri tariqkhasiri at gmail.com
Tue Mar 28 08:58:17 EDT 2023


Thanks for clearing up the matter of what I was trying to ask.

measuring the distance from each interstate intersection to ITS nearest
county border - is my end goal.

I apologize for being vague.

Before doing so I wanted to make sure I'm on the right path since I have no
prior experience working with shp files with python code. So, before
jumping in I wanted to be assured that this is the right way to go forward
given the shp files.



On Tue, 28 Mar 2023 at 07:31, Dennis Lee Bieber <wlfraed at ix.netcom.com>
wrote:

> On Mon, 27 Mar 2023 21:58:31 -0500, Tariq Khasiri <tariqkhasiri at gmail.com>
> declaimed the following:
>
> >Hello everyone,
> >
> >For a particular project, I need to collect the distance data from each US
> >county to the nearest intersection of interstate highway.
> >
>
>         I'd be concerned about the poorly defined requirement you state at
> the
> start. Where IN the county is your zero reference, from which to determine
> "nearest"?
>
>         For example, if the zero reference is the SE corner of Kent county
> MI
> (one of the nice /rectangular/ counties) then the nearest such intersection
> would be I-96 and M-50/Alden Nash. From the NW corner, you'd have to follow
> M-37 down through Kent City, Sparta, and into Comstock Park to find an
> intersection with (again) I-96 -- and likely have to test a dozen
> intersections of I-96 as that is the fringe of the Grand Rapids metro area,
> and there are intersections every mile if not more often.
>
>         It is a different matter if you mean "from each interstate
> intersection
> to ITS nearest county border".
>
> >do you think I can execute my goal successfully with the code snippet
> above
> >??
>
>         Have you tried it? I didn't see anything asking about help with
> Python,
> nor with the shape files.
>
>         You presented a batch of code, and are basically asking us to say
> Yay/Nay as to if it will do what you want. "Do what you want" is algorithm
> design, and well thought out algorithms are language neutral -- you should
> be able to take the algorithm and code it in Python, REXX, even COBOL.
> Asking for what Python structure/language feature may be best for
> representing part of the algorithm is something suitable, but I would not
> think asking us to vet your application would be... As you can see from my
> opening, there are different ways to interpret your requirement -- which
> means different algorithms may be applied and argued to be correct.
>
>
>
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> https://mail.python.org/mailman/listinfo/tutor
>


More information about the Tutor mailing list