[Qgis-user] Geoprocessing question

Alex Mandel tech_dev at wildintellect.com
Fri Feb 5 09:14:47 PST 2010


Zoran Jankovic 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
> 
> If I perform "intersect" I get a new layer with point within polygons, that
> now contain both "street_name" and "house_number" among others, _except_ for
> the houses/points that are on the crossroads, because they intersect with
> more than one polygon (street buffer). Let's say there are maybe 5%, or
> less, points that are on the crossroads, so my solution for now is to add
> them manually later after intersection.
> 
> Of course, the resulting shapefile contains more fields (columns), that are
> not needed, but cannot be erased in QGIS, or at least I haven't figured out
> how...
> 
> The second approach that crosses my mind is to import all of the shapefiles
> into PostGIS, but I do not have very much experience with "spatial queries"
> per se - is it possible to refine this process in PostGIS?
> 
> If anyone has any ideas/pointers/suggestions/experience with similar tasks I
> would be very grateful :-).
> 
> 
> BR,
> 
> ---

You could easily use either Spatialite or Postgis and not even need to
permanently create the buffer as it can be done on the fly.
Also if you select both matches at an intersection you can then use a
query on the results table to only give you the house that had 2
matches, and remove the ones you want from that list so they only have
one. It might even be possible to have the computer just pick based on
some arbitrary rule like which line is the center point closer to.

An alternate method is that in GRASS there are commands to basically
find and attach a point to the nearest part of a line network(This is
the setup for a path analysis/routing). v.path, v.net

Alex



More information about the Qgis-user mailing list