[GRASS-user] Topological Trouble

I'm trying to create a map with isolines for the road-distance places
are from bus routes. I was trying to roughly follow
http://jcastellssala.wordpress.com/2012/05/07/basic-network-analysis-with-grass/
but I don't quite get similar results (I feel like the network isn't
completely connected, but this is the first time I'm doing this so it's
more likely I'm just doing it wrong.

I am using the following shapefiles in SRID 2272 (NAD83 / Pennsylvania
South (ftUS)):

http://jimkeener.com/grass-topo-question/roads.tar.bz2 which is the
TIGER road graph for Allegheny County, PA, USA (state fips = 42, county
fips = 003), but reprojected to 2272 and a "length" attribute added.

http://jimkeener.com/grass-topo-question/stops.tar.bz2 which is derived
from the Port Authority of Allegheny County GTFS file found at
http://www.portauthority.org/paac/CompanyInfoProjects/DeveloperResources.aspx
and reprojected to 2272.

So, the first thing I did is import these files:

v.in.ogr dsn=roads.shp layer=roads output=roads
v.in.ogr dsn=stops.shp layer=stops output=stops

(http://jimkeener.com/grass-topo-question/ac.png)

Then I connect the stops to the network

v.net input=roads points=stops output=network operation=connect thresh=500

Connect the require database layer

v.db.connect map=network table=schools layer=2

Then allocate the network

v.net.alloc --overwrite --verbose input=network output=network_alloc ccats=1-6965

(http://jimkeener.com/grass-topo-question/ac-alloc-zoom-thumb.png when
displayed with d.vect -c) (the little Xs are bus stops

And create isolines at 1-, 2-, and 3- thousand feet

v.net.iso --overwrite input=network output=network_isolines ccats=1-6965 costs=1000,2000,3000 afcolumn=LENGTH abcolumn=LENGTH

(http://jimkeener.com/grass-topo-question/ac-isolines-zoom.png also with
d.vect -c)

All but a few of the roadways near the open space to the right (a park
and very hilly (even by Pittsburgh standards:-p) area) are within 3000
feet of a bus stop. Therefor I was expecting almost all of the roads to
be highlighted in different colors representing their distance from a stop.

Thank you for any help!
Jim

Jim,

please post your GRASS version to the list to better help.

Markus

On Thu, Aug 28, 2014 at 1:40 PM, James Keener <jim@jimkeener.com> wrote:

I'm trying to create a map with isolines for the road-distance places
are from bus routes. I was trying to roughly follow
http://jcastellssala.wordpress.com/2012/05/07/basic-network-analysis-with-grass/
but I don't quite get similar results (I feel like the network isn't
completely connected, but this is the first time I'm doing this so it's
more likely I'm just doing it wrong.

I am using the following shapefiles in SRID 2272 (NAD83 / Pennsylvania
South (ftUS)):

http://jimkeener.com/grass-topo-question/roads.tar.bz2 which is the
TIGER road graph for Allegheny County, PA, USA (state fips = 42, county
fips = 003), but reprojected to 2272 and a "length" attribute added.

http://jimkeener.com/grass-topo-question/stops.tar.bz2 which is derived
from the Port Authority of Allegheny County GTFS file found at
http://www.portauthority.org/paac/CompanyInfoProjects/DeveloperResources.aspx
and reprojected to 2272.

So, the first thing I did is import these files:

v.in.ogr dsn=roads.shp layer=roads output=roads
v.in.ogr dsn=stops.shp layer=stops output=stops

(http://jimkeener.com/grass-topo-question/ac.png)

Then I connect the stops to the network

v.net input=roads points=stops output=network operation=connect thresh=500

Connect the require database layer

v.db.connect map=network table=schools layer=2

Then allocate the network

v.net.alloc --overwrite --verbose input=network output=network_alloc ccats=1-6965

(http://jimkeener.com/grass-topo-question/ac-alloc-zoom-thumb.png when
displayed with d.vect -c) (the little Xs are bus stops

And create isolines at 1-, 2-, and 3- thousand feet

v.net.iso --overwrite input=network output=network_isolines ccats=1-6965 costs=1000,2000,3000 afcolumn=LENGTH abcolumn=LENGTH

(http://jimkeener.com/grass-topo-question/ac-isolines-zoom.png also with
d.vect -c)

All but a few of the roadways near the open space to the right (a park
and very hilly (even by Pittsburgh standards:-p) area) are within 3000
feet of a bus stop. Therefor I was expecting almost all of the roads to
be highlighted in different colors representing their distance from a stop.

Thank you for any help!
Jim

_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

6.4.3 sorry about not including that from the start.

On August 28, 2014 3:42:45 PM EDT, Markus Neteler neteler@osgeo.org wrote:

Jim,

please post your GRASS version to the list to better help.

Markus

On Thu, Aug 28, 2014 at 1:40 PM, James Keener <jim@jimkeener.com> wrote:

> I'm trying to create a map with isolines for the road-distance places
>  are from bus routes.  I was trying to roughly follow
>  [http://jcastellssala.wordpress.com/2012/05/07/basic-network-analysis-with-grass](http://jcastellssala.wordpress.com/2012/05/07/basic-network-analysis-with-grass)/
>  but I don't quite get similar results (I feel like the network isn't
>  completely connected, but this is the first time I'm doing this so it's
>  more likely I'm just doing it wrong.
> 
>  I am using the following shapefiles in SRID 2272 (NAD83 / Pennsylvania
>  South (ftUS)):
> 
>  [http://jimkeener.com/grass-topo-question/roads.tar.bz2](http://jimkeener.com/grass-topo-question/roads.tar.bz2) which is the
>  TIGER road graph for Allegheny County, PA, USA (state fips = 42, county
>  fips = 003), but reprojected to 2272 and a "length" attribute added.
> 
>  [http://jimkeener.com/grass-topo-question/stops.tar.bz2](http://jimkeener.com/grass-topo-question/stops.tar.bz2) which is derived
>  from the Port Authority of Allegheny County GTFS file found at
>  [http://www.portauthority.org/paac/CompanyInfoProjects/DeveloperResources.aspx](http://www.portauthority.org/paac/CompanyInfoProjects/DeveloperResources.aspx)
>  and reprojected to 2272.
> 
>  So, the first thing I did is import these files:
> 
> > [v.in](http://v.in).ogr dsn=roads.shp layer=roads output=roads
> >  [v.in](http://v.in).ogr dsn=stops.shp layer=stops output=stops
> 
>  ([http://jimkeener.com/grass-topo-question/ac.png](http://jimkeener.com/grass-topo-question/ac.png))
> 
>  Then I connect the stops to the network
> 
> > [v.net](http://v.net) input=roads points=stops output=network operation=connect thresh=500
> 
>  Connect the require database layer
> 
> > v.db.connect map=network table=schools layer=2
> 
>  Then allocate the network
> 
> > [v.net](http://v.net).alloc --overwrite --verbose input=network
> > output=network_alloc ccats=1-6965
> 
>  ([http://jimkeener.com/grass-topo-question/ac-alloc-zoom-thumb.png](http://jimkeener.com/grass-topo-question/ac-alloc-zoom-thumb.png) when
>  displayed with d.vect -c) (the little Xs are bus stops
> 
>  And create isolines at 1-, 2-, and 3- thousand feet
> 
> > [v.net](http://v.net).iso --overwrite input=network output=network_isolines ccats=1-6965 costs=1000,2000,3000 afcolumn=LENGTH abcolumn=LENGTH
> 
>  ([http://jimkeener.com/grass-topo-question/ac-isolines-zoom.png](http://jimkeener.com/grass-topo-question/ac-isolines-zoom.png) also with
>  d.vect -c)
> 
>  All but a few of the roadways near the open space to the right (a park
>  and very hilly (even by Pittsburgh standards:-p) area) are within 3000
>  feet of a bus stop. 
> Therefor I was expecting almost all of the roads to
>  be highlighted in different colors representing their distance from a stop.
> 
>  Thank you for any help!
>  Jim
> 
> ---
> 
>  grass-user mailing list
>  grass-user@lists.osgeo.org
>  [http://lists.osgeo.org/mailman/listinfo/grass-user](http://lists.osgeo.org/mailman/listinfo/grass-user)


Sent from my Android device with K-9 Mail. Please excuse my brevity.

On Thu, Aug 28, 2014 at 10:32 PM, James Keener <jim@jimkeener.com> wrote:

6.4.3 sorry about not including that from the start.

On August 28, 2014 3:42:45 PM EDT, Markus Neteler <neteler@osgeo.org> wrote:

...

On Thu, Aug 28, 2014 at 1:40 PM, James Keener <jim@jimkeener.com> wrote:

I'm trying to create a map with isolines for the road-distance places
are from bus routes. I was trying to roughly follow

http://jcastellssala.wordpress.com/2012/05/07/basic-network-analysis-with-grass/

(nice tutorial, btw)

Note that their projection is in meters, while...

I am using the following shapefiles in SRID 2272 (NAD83 / Pennsylvania
South (ftUS)):

... your's is in US feet (http://epsg.io/2272).
This affect the threshold you use below:

...

So, the first thing I did is import these files:

...

Then I connect the stops to the network

v.net input=roads points=stops output=network operation=connect
thresh=500

Note that the threshold is specified in map units (so, here feet in your case).

Sidenote: in GRASS GIS 7 the module is a bit more advanced:
http://grass.osgeo.org/grass70/manuals/v.net.html

Perhaps (guessing, I didn't have time to test your data), the initial
threshold makes the difference?

Best,
Markus

Thanks for replying Markus,

Note that their projection is in meters, while...

I am using the following shapefiles in SRID 2272 (NAD83 / Pennsylvania
South (ftUS)):

... your's is in US feet (http://epsg.io/2272).
This affect the threshold you use below:

I know. For testing purposes it seemed to be reasonable, though
(increments of 1000 ft. For my final map I'll probably do 1/4mi, 1/2mi,
3/4mi, and 1mi increments).

v.net input=roads points=stops output=network operation=connect
thresh=500

Note that the threshold is specified in map units (so, here feet in your case).

I spot checked a lot of the bus stops, and they appeared to be connected
to the road graph. FWIW. The TIGER road maps do appear to make
intersections overlap, but don't put a point that all the adjoining
roads connect to. (This brings up something I was going to worry about
later: bridges vs intersections?)

Sidenote: in GRASS GIS 7 the module is a bit more advanced:
http://grass.osgeo.org/grass70/manuals/v.net.html

Perhaps (guessing, I didn't have time to test your data), the initial
threshold makes the difference?

I'll have to give GRASS 7 a shot:) (GRASS 6 is what was in the repo I
was using).

I'm completely new at this so the biggest problem for me is not know
exactly where to look when something isn't working.

Thanks again for your input!

Jim

Hello,

I wrote a tutorial on how to go from a TIGER road map and GTFS data to a
topological analysis of bus stops. There are some minor formatting
issues I'm working on, but was hoping to get technical or other feedback
on it.

http://jimkeener.com/posts/analyizing-bus-routes

Thank you,
Jim

Jim,

I’ll try to find some time to work through your tutorial in the next few days; I’ll get back to you – I just took a quick look and I think it looks good. BTW, I’m also using Ubuntu (14.04).

Tom

···

On Thu, Sep 11, 2014 at 11:29 PM, James Keener <jim@jimkeener.com> wrote:

Hello,

I wrote a tutorial on how to go from a TIGER road map and GTFS data to a
topological analysis of bus stops. There are some minor formatting
issues I’m working on, but was hoping to get technical or other feedback
on it.

http://jimkeener.com/posts/analyizing-bus-routes

Thank you,
Jim


grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user