Skip to content

Commit

Permalink
add additional streetplan mappings
Browse files Browse the repository at this point in the history
  • Loading branch information
kfarr committed Jan 10, 2025
1 parent 0fb5a85 commit 7b24be5
Showing 1 changed file with 145 additions and 118 deletions.
263 changes: 145 additions & 118 deletions src/components/managed-street.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,134 +41,161 @@ const STREETPLAN_MATERIAL_MAPPING = {
};

const STREETPLAN_OBJECT_MAPPING = {
'Away, Left Park, Head In': '',
'Barrier 1-ft': '',
'Barrier 2-ft': '',
'Bike Food Cart': '',
'BikeRack Bollard': '',
'Bikelane ShareCar': '',
'Blank PedRefuge (8ft)': '',
'Blue Car': '',
'Blue Mailbox': '',
'Bollard Plastic Yellow': '',
'Boxwood planter 2ft': '',
'Boxwood planter 3ft': '',
'Boxwood planter 5ft': '',
'Bur Oak': 'tree3',
'Cactus Median (10ft)': '',
'Cactus Median (12ft)': '',
'Cactus Median (4ft)': '',
'Cactus Median (6ft)': '',
'Cactus Median (8ft)': '',
'DesertWillow Texas': 'tree3',
'Empty place holder': '',
'English oak': 'tree3',
'FleaMarket Stuff': '',
'Flower Median (10ft)': '',
'Flower Median (12ft)': '',
'Flower Median (4ft)': '',
'Flower Median (6ft)': '',
'Flower Median (8ft)': '',
'Flower Pot 4ft': '',
'FloweringPear 18ft': '',
'Flowers PedRefuge (8ft)': '',
Goldenraintree: 'tree3',
'GrassMound (10ft)': '',
'GrassMound (12ft)': '',
'GrassMound (4ft)': '',
'GrassMound (6ft)': '',
'GrassMound (8ft)': '',
'Grassy Median (10ft)': '',
'Grassy Median (12ft)': '',
'Grassy Median (4ft)': '',
'Grassy Median (6ft)': '',
'Grassy Median (8ft)': '',
'Green Car': '',
'Historic Light': '',
Honeylocust: '',
'Japanese Zelkova': 'tree3',
'Japanese lilac': 'tree3',
'Jerusalem Thorn': 'tree3',
'Kentucky Coffeetree': 'tree3',
'Large Food Cart': '',
'Large Oak': '',
'Light rail poles': '',
'Moto highway rider': '',
'Mountable Barrier 1-ft': '',
'NYC Bike Rack': '',
'Orange Barrel': '',
'Palm Tree': 'palm-tree',
'PalmTree 20ft': 'palm-tree',
'PalmTree 28ft': 'palm-tree',
'Pine Tree': 'tree3',
'Pink flower 16ft': '',
'Planter flowers': '',
'Planter with bench': '',
'Power Tower 30ft': '',
'Purpendicular Right side, Blue': '',
'Purpendicular Right side, Red': '',
'Purpleleaf plum': '',
'Red berries 14ft': '',
'Rock Median (10ft)': '',
'Rock Median (12ft)': '',
'Rock Median (4ft)': '',
'Rock Median (6ft)': '',
'Rock Median (8ft)': '',
'Semi Truck': '',
Shelter: '',
'Shelter Roundroof': '',
'Sign directory': '',
'Small Tree': 'tree3',
'SmartCar 5ft': '',
'SoundWall (12ft)': '',
'SoundWall (8ft)': '',
'SoundWall Plants (12ft)': '',
'SoundWall Plants (8ft)': '',
'Street light': '',
'Streetlight solar': '',
'Streetlight solar banners 1': '',
'Streetlight solar banners 2': '',
TallGrass: '',
'TallPlantBox (10ft)': '',
'TallPlantBox (12ft)': 'dividers-bush',
'TallPlantBox (4ft)': '',
'TallPlantBox (6ft)': '',
'TallPlantBox (8ft)': '',
'TallPlantBox PedRef (10ft)': '',
'TallPlantBox PedRef (12ft)': '',
'TallPlantBox PedRef (6ft)': '',
'TallPlantBox PedRef (8ft)': '',
'Telephone pole': '',
'Tent BlueWhite': '',
'Tent Veggie': '',
'Toward, Right Park, Head In': '',
'Tropical Median (4ft)': '',
'Weeds Median (4ft)': '',
'Weeds Median (6ft)': '',
'Weeds Median (8ft)': '',
'White Sedan': '',
'White Truck': '',
'White coup': '',
'Yellow Sedan': '',
'historic no banner': '',
'historic with banners': '',
'historic with flowers 1': '',
'historic with flowers 2': '',
'random trashcan': '',
trashcan: ''
'away, left park, head in': '',
'barrier 1-ft': 'temporary-jersey-barrier-concrete',
'barrier 2-ft': 'temporary-jersey-barrier-concrete',
'bike food cart': '',
'bikelane sharecar': '',
'bikerack bollard': '',
'blank pedrefuge (8ft)': '',
'blue car': 'sedan-rig',
'blue mailbox': 'usps-mailbox',
'bollard plastic yellow': 'bollard',
boulevardcirculator: 'minibus',
'boulevardcirculator rev': 'minibus',
'boxwood planter 2ft': 'dividers-planter-box',
'boxwood planter 3ft': 'dividers-planter-box',
'boxwood planter 5ft': 'dividers-planter-box',
'bur oak': 'tree3',
bus: 'bus',
'bus rev': 'bus',
'cactus median (10ft)': 'dividers-bush',
'cactus median (12ft)': 'dividers-bush',
'cactus median (4ft)': 'dividers-bush',
'cactus median (6ft)': 'dividers-bush',
'cactus median (8ft)': 'dividers-bush',
'casual woman': '',
couple: '',
'couple biking': '',
'desertwillow texas': 'tree3',
'dog walker': '',
'empty place holder': '',
'english oak': 'tree3',
'fleamarket stuff': '',
'flower median (10ft)': 'dividers-flowers',
'flower median (12ft)': 'dividers-flowers',
'flower median (4ft)': 'dividers-flowers',
'flower median (6ft)': 'dividers-flowers',
'flower median (8ft)': 'dividers-flowers',
'flower pot 4ft': 'dividers-flowers',
'floweringpear 18ft': 'tree3',
'flowers pedrefuge (8ft)': 'dividers-flowers',
goldenraintree: 'tree3',
'golfcart red 4ft back': 'tuk-tuk',
'grassmound (10ft)': '',
'grassmound (12ft)': '',
'grassmound (4ft)': '',
'grassmound (6ft)': '',
'grassmound (8ft)': '',
'grassy median (10ft)': '',
'grassy median (12ft)': '',
'grassy median (4ft)': '',
'grassy median (6ft)': '',
'grassy median (8ft)': '',
'green car': 'sedan-rig',
'heavy rail': 'tram',
'heavy rail rev': 'tram',
'historic light': 'lamp-traditional',
'historic no banner': 'lamp-traditional',
'historic with banners': 'lamp-traditional',
'historic with flowers 1': 'lamp-traditional',
'historic with flowers 2': 'lamp-traditional',
honeylocust: 'tree3',
'japanese lilac': 'tree3',
'japanese zelkova': 'tree3',
'jerusalem thorn': 'tree3',
'kentucky coffeetree': 'tree3',
'large food cart': '',
'large oak': 'tree3',
'light rail poles': '',
'moto highway rider': 'motorbike',
'mountable barrier 1-ft': '',
'nev shuttle back': 'minibus',
'nev shuttle front': 'minibus',
'nyc bike rack': 'bikerack',
'orange barrel': 'temporary-traffic-cone',
'palm tree': 'palm-tree',
'palmtree 20ft': 'palm-tree',
'palmtree 28ft': 'palm-tree',
'pine tree': 'tree3',
'pink flower 16ft': 'tree3',
'planter flowers': 'dividers-flowers',
'planter with bench': 'bench',
'polaris gem e4': 'tuk-tuk',
'power tower 30ft': '',
'purpendicular right side, blue': '',
'purpendicular right side, red': '',
'purpleleaf plum': 'tree3',
'random trashcan': 'trash-bin',
'red berries 14ft': 'tree3',
'red car': 'sedan-rig',
'red jeep': 'suv-rig',
'rock median (10ft)': '',
'rock median (12ft)': '',
'rock median (4ft)': '',
'rock median (6ft)': '',
'rock median (8ft)': '',
'semi truck': 'box-truck-rig',
'serious man': '',
shelter: 'bus-stop',
'shelter roundroof': 'bus-stop',
'sign directory': 'wayfinding',
'silver suv': 'suv-rig',
'small tree': 'tree3',
smallnev: 'minibus',
'smartcar 5ft': 'self-driving-cruise-car-rig',
'soundwall (12ft)': '',
'soundwall (8ft)': '',
'soundwall plants (12ft)': '',
'soundwall plants (8ft)': '',
'street light': 'lamp-modern',
'streetcar blue': 'trolley',
'streetcar red 1': 'trolley',
'streetcar red 2': 'trolley',
'streetcar yellow': 'trolley',
'streetlight solar': 'lamp-modern',
'streetlight solar banners 1': 'lamp-modern',
'streetlight solar banners 2': 'lamp-modern',
tallgrass: '',
'tallplantbox (10ft)': '',
'tallplantbox (12ft)': 'dividers-bush',
'tallplantbox (4ft)': '',
'tallplantbox (6ft)': '',
'tallplantbox (8ft)': '',
'tallplantbox pedref (10ft)': '',
'tallplantbox pedref (12ft)': '',
'tallplantbox pedref (6ft)': '',
'tallplantbox pedref (8ft)': '',
'telephone pole': 'utility_pole',
'tent bluewhite': '',
'tent veggie': '',
'toward, right park, head in': '',
trashcan: 'trash-bin',
'tropical median (4ft)': 'palm-tree',
'two bikes back': '',
'uta bus': 'bus',
'uta lightrail': 'tram',
'uta lightrail rev': 'tram',
'weeds median (4ft)': '',
'weeds median (6ft)': '',
'weeds median (8ft)': '',
'white coup': 'sedan-rig',
'white sedan': 'sedan-rig',
'white truck': 'box-truck-rig',
'yellow sedan': 'sedan-rig'
};

// Helper function to parse O-Tags string into array
// Streetplan Helper function to parse O-Tags string into array
function parseOTags(tags) {
if (!tags || tags === '-') return [];
return tags.split('", "').map((t) => t.replace(/"/g, '').trim());
}

// Helper function to create clone configuration
// Streetplan Helper function to create clone configuration
function createCloneConfig(name, tags) {
if (!name || name === '-') return null;

const model = STREETPLAN_OBJECT_MAPPING[name];
const model = STREETPLAN_OBJECT_MAPPING[name.toLowerCase()];
if (!model) return null;

return {
Expand Down

0 comments on commit 7b24be5

Please sign in to comment.