Mappedin Parser
agent/parsers/mappedin.py — handles Vicinity, Mirvac, and international Mappedin-powered malls.
Input
Directory containing sniffed Mappedin API responses:
public_1_polygon_*.json— vertexes for all polygonspublic_1_map_*.json— floor definitions with georef control pointspublic_1_location_*.json— store names, amenity locations with semantic names
Coordinate Transform
Mappedin provides 3+ georef control points per floor (map.georeference[]). Each maps a pixel-space (x, y) to a real-world (lat, lng). The parser builds an affine transform (GeorefTransform.from_control_points()) and applies it to all coordinates, producing WGS84 [lng, lat] output.
Layer Classification
Polygon layers map to feature types:
| Layer | Feature Type | Category |
|---|---|---|
Polygon, Anchor, Kiosk, etc. | unit | shop |
Seating Area | unit | service |
Washroom / Washrooms | amenity | toilet |
Connection / Connections | amenity | escalator |
Entrance / Entrances | amenity | exit |
Amenities Icons | Skipped | — |
Floor, Wall, Void, etc. | Skipped | — |
Amenity Classification from Locations
The public_1_location_*.json file is the authoritative source of amenity classification. When a location of type "amenities" links to a polygon via its polygons[] array, the location's name overrides the layer-based classification.
24+ name patterns in AMENITY_NAME_PATTERNS (case-insensitive substring, ordered most-specific first):
| Pattern | Category |
|---|---|
escalator, escalators | escalator |
elevator, elevators, lifts | elevator |
staircase, stairs | stairs |
parent with pram | parking |
parents room, family room | parents_room |
restroom, washroom, toilet | toilet |
atm | atm |
ev charging, charging station | ev_charging |
accessible parking, car park | parking |
uber, rideshare, drop-off | rideshare |
taxi | taxi |
bus, shuttle | bus |
valet | valet |
concierge, visitor lounge | concierge |
guest services, directory | info |
Unmatched amenity names are logged as warnings.
Store Name Index
Store/tenant locations (type: "store" or type: "tenant") are indexed by polygon ID. When a unit polygon's ID matches a location's polygons[].id, the store name becomes the feature's label.
Note: Some Mappedin tenants (e.g. Philippines malls) miscategorize stores as type: "amenities". The parser handles this correctly — unmatched amenity names fall through to the name index as store labels.
Output
ParserResult with:
floors[]— each withfeatures[](ParsedFeature),bbox,georefhas_georef— true if any floor has geographic coordinateswarnings[]— unmapped amenity names, missing files, etc.