[polygons] Adding university and hospital polygons to the subdivisions index, (multiple sub-buildings but still want to know the parent entity)
This commit is contained in:
@@ -251,7 +251,7 @@ class OSMAdminPolygonReader(OSMPolygonReader):
|
||||
|
||||
class OSMSubdivisionPolygonReader(OSMPolygonReader):
|
||||
def include_polygon(self, props):
|
||||
return 'landuse' in props or 'place' in props
|
||||
return 'landuse' in props or 'place' in props or 'amenity' in props
|
||||
|
||||
|
||||
class OSMBuildingPolygonReader(OSMPolygonReader):
|
||||
|
||||
@@ -98,9 +98,10 @@ osmfilter $PLANET_O5M --keep="name= and ( $VALID_NEIGHBORHOODS )" --drop-relatio
|
||||
|
||||
echo "Filtering for subdivision polygons"
|
||||
PLANET_SUBDIVISIONS="planet-subdivisions.osm"
|
||||
SUBDIVISION_AMENITY_TYPES="amenity=university or amentiy=college or amentiy=school or amentiy=hospital"
|
||||
SUBDIVISION_LANDUSE_TYPES="landuse=residential or landuse=commercial or landuse=industrial or landuse=retail or landuse=military"
|
||||
SUBDIVISION_PLACE_TYPES="place=allotmenets or place=city_block or place=plot or place=subdivision"
|
||||
osmfilter $PLANET_O5M --keep="( $SUBDIVISION_PLACE_TYPES or $SUBDIVISION_LANDUSE_TYPES )" --drop="( place= and not ( $SUBDIVISION_PLACE_TYPES ) ) or boundary=" --drop-author --drop-version -o=$PLANET_SUBDIVISIONS
|
||||
osmfilter $PLANET_O5M --keep="( $SUBDIVISION_AMENITY_TYPES or $SUBDIVISION_PLACE_TYPES or $SUBDIVISION_LANDUSE_TYPES )" --drop="( place= and not ( $SUBDIVISION_PLACE_TYPES ) ) or boundary=" --drop-author --drop-version -o=$PLANET_SUBDIVISIONS
|
||||
|
||||
echo "Filtering for postal_code polygons"
|
||||
PLANET_POSTAL_CODES="planet-postcodes.osm"
|
||||
|
||||
@@ -434,7 +434,7 @@ class OSMSubdivisionReverseGeocoder(OSMReverseGeocoder):
|
||||
cache_size = 10000
|
||||
simplify_polygons = False
|
||||
polygon_reader = OSMSubdivisionPolygonReader
|
||||
include_property_patterns = OSMReverseGeocoder.include_property_patterns | set(['landuse', 'place'])
|
||||
include_property_patterns = OSMReverseGeocoder.include_property_patterns | set(['landuse', 'place', 'amenity'])
|
||||
|
||||
|
||||
class OSMBuildingReverseGeocoder(OSMReverseGeocoder):
|
||||
|
||||
Reference in New Issue
Block a user