Find place
Looks up airports and ports by code or name, and your own sites, and returns their positions as a Table.
@lainstack/transport/find-place · Freight · Available on Lainstack Cloud
How to use it
Section titled “How to use it”Use Find place to turn the airport or port codes or names in a Table, such as the origin and destination of each shipment, into positions. Build route and the Map view use them.
Good to know:
- Give Rows and the Column holding the code or name, or give Legs (a Table with From and To columns, such as from Read Excel). With Legs, every different From and To is looked up once, so one Found Table serves Build route.
- Matching goes in this order: your Sites Table (by place or name), an airport’s IATA code (LHR) or ICAO code (EGLL), a port’s UN/LOCODE (GBFXT or GB FXT), then the full name of an airport or port. Carrier codes such as CNSHA for Shanghai port work too. Capitals, accents and punctuation are ignored. Part of a name never matches.
- A code counts only when written all capitals (GAO) or all lower case; “Gao” is a name. Spellings Build route reads as one (BUD, Bud) that may be different places all go to Not found.
- A value that could be several places is never guessed: it goes to Not found with the candidates. With Legs, a name shared by one airport and one port is the port when every leg using it is sea, ferry or inland_waterway, and the airport when every one is air.
- Sites is optional: a Table with Place, Name, Country, Kind, Latitude and Longitude columns, such as your depots. Sites always win.
- Found has one row per place that matched, with its position and the data version, status, source row and source it came from. The place is written as it was in your Table, so Build route can match it to a leg.
- Ports come from the NGA World Port Index (Pub 150), in the public domain, with positions to about 1.8 km. A few ports it lacks were added by hand, each naming its source. Build route does not route sea legs yet, so give a sea leg its distance.
- Airport data is from OurAirports, in the public domain.
Settings
Section titled “Settings”| Setting | Key | Type | Details |
|---|---|---|---|
| Rows | rows |
Value | A Table from an earlier step, such as your jobs. |
| Code or name column | column |
List | The column with an airport code (LHR, EGLL), a port code (GBFXT) or a full name (London Heathrow Airport). At most 8 items. |
| Or legs | legs |
Value | Instead of rows and a column: a Table of legs with From and To columns. Every different From and To is looked up. |
| Your sites | sites |
Value | Optional. A Table with Place, Name, Country, Kind, Latitude and Longitude columns. Checked before airports and ports. |
Outputs
Section titled “Outputs”| Output | Path | Type |
|---|---|---|
| Found | found |
Value |
| Not found | notFound |
Value |