[Qgis-user] Geoprocessing question

Martin Dobias wonder.sk at gmail.com
Sat Feb 6 13:52:53 PST 2010


On Fri, Feb 5, 2010 at 12:36 PM, Zoran Jankovic <zoran.jankovic at zisis.hr> wrote:
> OK list, here is one more philosophical GIS question, with more than one
> answer possible.
> Task: create one layer with street names, house numbers and city name
> Set up:
> - vector layers are all shapefiles
> - one layer with points, attribute filed is "house_number" (presumably,
> someone will input this data point by point, by digitizing or GPS
> surveying...)
> - the second layer is "street buffer" - created from "streets", contains
> "street_name" field, among others

I had a similar task some time ago: match address points with street
name and house number to a roads layer, then assign house number
intervals for each road segment (also taking care whether the point is
on left/right side).

If you're not afraid of some python scripting, it's a powerful way to
go. I've ended up with doing these steps:
1. load roads layer to memory and create a spatial index for quick
access (using QgsSpatialIndex)
2. go through points one-by-one, find close road segments and check
whether road's name matches to the one of the point, determine on
which side of the road the point lies
3. assign the intervals to the roads layer

I've even found an old screenshot visualizing matched points with roads:
http://mapserver.sk/~wonder/qgis/adr_body.png
... from the picture you can see I was using ancient 0.8 release :-)

To your question about storing data in PostGIS: that never hurts.
Having your data in database is usually very convenient even if you're
not going to do some complex queries. And you can use indexes for
faster access.


Martin



More information about the Qgis-user mailing list