Created
November 1, 2022 17:17
-
-
Save geographika/92fa9ba922bb136b844b92db15187e12 to your computer and use it in GitHub Desktop.
Mapfile for Day 1 of 2022 #30DayMapChallenge: Points
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MAP | |
NAME "Nuclear Power Map" | |
EXTENT -1622777.025136114 5036320.52109153 2617519.4114628565 8597992.10957372 | |
PROJECTION | |
"init=epsg:3857" | |
END | |
SYMBOL | |
NAME "nuclear" | |
TYPE PIXMAP | |
IMAGE "nuclear-power-plant.png" | |
END | |
SYMBOL | |
NAME "background" | |
TYPE PIXMAP | |
IMAGE "paper.png" | |
END | |
IMAGECOLOR "#ADD8E6" | |
LAYER | |
NAME "countries" | |
TYPE POLYGON | |
PROJECTION | |
"init=epsg:4326" | |
END | |
STATUS ON | |
CONNECTIONTYPE OGR | |
CONNECTION "/vsis3/mapserverstudio/data/natural_earth_vector.gpkg" | |
DATA "ne_10m_admin_0_countries" | |
EXTENT -180.0 -90.0 180.0 90 | |
PROCESSING "CLOSE_CONNECTION=DEFER" | |
FILTER ( ( "[ADMIN]" = "France" ) OR ( "[ADMIN]" = "United Kingdom" ) ) | |
CLASS | |
STYLE | |
SYMBOL "background" | |
END | |
END | |
END | |
LAYER | |
TYPE POINT | |
NAME "test" | |
PROJECTION | |
"init=epsg:4326" | |
END | |
SYMBOLSCALEDENOM 15000000 | |
CONNECTIONTYPE OGR | |
STATUS ON | |
CONNECTION "<OGRVRTDataSource> | |
<OGRVRTLayer name='nuclear_power_plants'> | |
<SrcDataSource>/vsicurl/https://raw.githubusercontent.com/cristianst85/GeoNuclearData/master/data/csv/denormalized/nuclear_power_plants.csv</SrcDataSource> | |
<SrcSQL dialect='sqlite'>SELECT *, (Capacity/50 + 8) AS SymbolSize FROM nuclear_power_plants WHERE Status = 'Operational' AND CountryCode IN ('GB','FR')</SrcSQL> | |
<GeometryType>wkbPoint</GeometryType><LayerSRS>WGS84</LayerSRS> | |
<GeometryField encoding='PointFromColumns' x='Longitude' y='Latitude'/> | |
</OGRVRTLayer> | |
</OGRVRTDataSource>" | |
DATA "nuclear_power_plants" | |
CLASS | |
NAME "test" | |
STYLE | |
SYMBOL "nuclear" | |
SIZE [SymbolSize] | |
END | |
END | |
END | |
LAYER | |
NAME "Title" | |
TYPE POINT | |
STATUS ON | |
FEATURE | |
POINTS | |
573978 7164993 | |
END | |
END | |
CLASS | |
LABEL | |
TEXT "OPERATIONAL|NUCLEAR POWER|STATIONS" | |
SIZE 20 | |
WRAP "|" | |
FONT "impact" | |
END | |
END | |
END | |
END |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment