Difference between revisions of "Benchmarking 2010/How to get some sample data"

From OSGeo
Jump to: navigation, search
m (sheet range)
(Vector data issues)
 
(28 intermediate revisions by 2 users not shown)
Line 39: Line 39:
  
 
Remember that the baseline of the OSGeo Benchmark for raster data are GeoTIFF files, but note you can only download ECW files. We will be converting the ECWs to GeoTIFFs.
 
Remember that the baseline of the OSGeo Benchmark for raster data are GeoTIFF files, but note you can only download ECW files. We will be converting the ECWs to GeoTIFFs.
 +
 +
There will be one big file for each one of the sheets in the following diagram. The area covers the whole [http://en.wikipedia.org/wiki/Catalonia Catalonia], which is about 32,114 km2 (12,399.3 sq mi):
 +
 +
[[image:cataluña_mtn50_sheets.png]]
  
 
== Vector data issues ==
 
== Vector data issues ==
  
 
Once unzipped, a sheet of vector data contains lots of shapefiles. The shapefiles will be merged, and most probably only the most interesting themes will be used.
 
Once unzipped, a sheet of vector data contains lots of shapefiles. The shapefiles will be merged, and most probably only the most interesting themes will be used.
 +
 +
Please note that the shapefiles are in ETRS89 + UTM28N/29N/30N/31N. The final shapefiles will be in WGS84, so you're encouraged to reproject them if you think it's neccesary for your testing.
  
 
A letter after the theme code explains what kind of geometry the shapefile contains. '''P''' stands for Point; '''L''' stands for Line; '''S''' stands for Surface (Polygon).
 
A letter after the theme code explains what kind of geometry the shapefile contains. '''P''' stands for Point; '''L''' stands for Line; '''S''' stands for Surface (Polygon).
 +
 +
Only the following layers will be used:
  
 
{| border="1"
 
{| border="1"
Line 51: Line 59:
 
| '''Theme'''
 
| '''Theme'''
 
| '''How should it be rendered'''
 
| '''How should it be rendered'''
 +
| '''Sample rendering'''
 
|-
 
|-
|colspan=2 | '''Administrative'''
+
|colspan=2 | '''Polygon'''
 
|-
 
|-
| 0101L   ||  '''Administrative Boundary''' || Depends on field TIPO_101, different kinds of dashed line
+
| 0501S.shp   ||  Settlement        || #C0C0C0 fill ;rendered under any other features
 +
 
 +
Optionally, use the field HABITANTES_501 to choose between 15 different fill images
 +
 
 
|-
 
|-
| 0104P   ||  Administrative Milestone
+
| 0507S.shp   ||  Building          ||
 +
{| border="1"
 +
|-
 +
| SINGU_0507 = 01 || #FFACAC fill ||(normal building)
 +
|-
 +
| SINGU_0507 = 02 || #FF7878 fill ||(singular building - e.g. historic relevance)
 +
|}
 +
 
 +
render at scales < 30,000
 +
 
 +
|| [[Image:btn25_residential.png]]
 
|-
 
|-
| 0107S   ||  National park
+
| 0513S.shp   ||  Industry          || #DB71FF fill, render at scales < 30,000                        || [[Image:btn25_industrial.png]]
 
|-
 
|-
|colspan=2 | '''Elevation & contour'''
+
|colspan=2 | '''Line'''
 
|-
 
|-
| 0201L    ||  '''Contour lines''' || Depends on field CATEG_201, 1px light or dark brown line
+
| 0201L.shp   ||  Contour lines  ||  
 +
{| border="1"
 +
|-
 +
| CATEG_0201 = 01 || 1px solid #E6B777 ||(normal contour line)
 +
|-
 +
| CATEG_0201 = 02 || 1px solid #BF8F2E ||(master contour line)
 +
|-
 +
| CATEG_0201 = 03 || do now draw      ||(auxiliary contour line)
 +
|}
 +
 
 +
render at scales < 30,000
 +
 
 +
  || [[Image:btn25_cont.png]]
 
|-
 
|-
| 0204P   ||  '''Elevation measured point''' || Label with field COTA_204
+
| 0601L.shp   ||  Motorway      ||
 +
{| border="1"
 +
|-
 +
| TIPO_0601 = 01 || 4px yellow (#FFFF00) line, with 2px red (#FF0000) casing and 1px red (#FF0000) centerline  || (autopista / motorway)
 +
|-
 +
| TIPO_0601 = 03 || 4px white (#FFFFFF) line, with 2px red (#FF0000) casing and 1px red (#FF0000) centerline  || (autovía / motorroad)
 +
|}
 +
|rowspan=4| [[Image:btn25_roads.png]] [[Image:btn25_roads_legend.png]]
 
|-
 
|-
| 0207L/0207S || Elevation discontinuity: cutting, embankment, scree
+
| 0604L.shp    ||  Road          || 3px orange, green or yellow line (depends on CFUN_0604 field) with 1px black casing
 +
{| border="1"
 +
|-
 +
| COMPE_0604 = 01 || 3px red (#FF0000) line, with 1px black (#000000) casing || (carretera nacional / trunk road)
 +
|-
 +
| COMPE_0604 != 01 and CFUN_0604 = 01 || 3px orange (#ffb501) line, with 1px black (#000000) casing || (carretera autonómica de 1er orden / primary road)
 +
|-
 +
| COMPE_0604 != 01 and CFUN_0604 = 02 || 3px green (#00d700) line, with 1px black (#000000) casing || (carretera autonómica de 2º orden / secondary road)
 +
|-
 +
| COMPE_0604 != 01 and CFUN_0604 = 03 || 3px yellow (#FFFF00) line, with 1px black (#000000) casing || (carretera autonómica de 3er orden / tertiary road)
 +
|}
 +
 
 
|-
 
|-
|colspan=2 | '''Hydrography'''
+
| 0607L.shp    ||  Motorway/road link ||
 +
{| border="1"
 +
|-
 +
| TIPO_0607 = 01 || Like autopistas (motorway), but half width
 +
|-
 +
| TIPO_0607 = 02 || Like autovías (motorroad), but half width
 +
|-
 +
| TIPO_0607 = 03 || Like carretera nacional (trunk road), but half width
 +
|-
 +
| TIPO_0607 = 04 || Like carreteras de 1er nivel (primary roads), but half width
 +
|-
 +
| TIPO_0607 = 05 || Like carreteras de 2º nivel (secondary roads), but half width
 +
|-
 +
| TIPO_0607 = 06 || Like carreteras de 3er nivel (tertiary roads), but half width
 +
|-
 +
| TIPO_0607 = 07 || Roundabout - like tracks, but half width
 +
|}
 
|-
 
|-
| 0301L   ||  '''River'''          || 3px blue line
+
| 0610L.shp   ||  Track        || 2px grey (#808080) line, 1px black (#000000) casing
 
|-
 
|-
| 0304L    ||  Canal                || 1px blue line, with flow arrow
+
|colspan=2 | '''Point'''
 
|-
 
|-
| 0307L   ||  Pipeline
+
| 0801P.shp   ||  Toponym w/o geometry    || Label with field ETIQUETA; font size, weight and italics depending on field TIPO; maybe icon depending on TIPO; render at scales < 50,000          ||rowspan=2| [[Image:btn25_topo.png]]
 
|-
 
|-
| 0310L    ||  Wash
+
| 0802P.shp   ||  Toponym w/ geometry      || Label with field ETIQUETA; font size, weight and italics depending on field TIPO; maybe icon depending on TIPO; render at scales < 50,000
|-
+
| 0312L    ||  Waterway axis
+
|-
+
| 0316S    ||  '''Lake'''          || 2px blue line for border, light blue fill
+
|-
+
| 0319S    ||  Wetlands
+
|-
+
| 0325L    ||  Reservoir
+
|-
+
| 0328S    ||  Pond
+
|-
+
| 0331S    ||  Depot
+
|-
+
| 0334P    ||  Raising
+
|-
+
| 0337P    ||  Waterfall
+
|-
+
| 0340P    ||  Siphon
+
|-
+
| 0343P    ||  Canal Milestone
+
|-
+
| 0346P    ||  Mouth
+
|-
+
| 0349L    ||  Closure
+
|-
+
| 0352L    ||  Coastline
+
|-
+
| 0355S    ||  Island
+
|-
+
| 0358S    ||  Salt Pond
+
|-
+
|colspan=2 | '''Farming'''
+
|-
+
| 0401L    ||  Firebreaker
+
|-
+
| 0404P    ||  Tree
+
|-
+
| 0407S    ||  Greenhouse
+
|-
+
|colspan=2 | '''Building/man-made'''
+
|-
+
| 0501S    ||  '''Settlement'''        || Light grey fill, rendered under any other features
+
|-
+
| 0504S    ||  Building group
+
|-
+
| 0507S    ||  '''Building'''          || Pinkish/Purplish fill
+
|-
+
| 0513S    ||  '''Industry'''          || Purplish fill
+
|-
+
| 0516S    ||  Place of worship
+
|-
+
| 0519S    ||  Mill
+
|-
+
| 0522S    ||  Cemetery
+
|-
+
| 0525P    ||  Monument
+
|-
+
| 0528L    ||  '''Wall/fence'''        || 1px black line
+
|-
+
| 0531L    ||  Block
+
|-
+
| 0534P    ||  Tower
+
|-
+
| 0537P    ||  Cave
+
|-
+
| 0540P/0540S || Mine
+
|-
+
| 0543P/0543L || Tunnel
+
|-
+
| 0546L/0546S || Bridge
+
|-
+
| 0549L    ||  Aquaduct
+
|-
+
| 0552S    ||  Dam
+
|-
+
| 0555L/0555S || Historic building  || Pinkish fill
+
|-
+
| 0558P/0558S || Archaeological
+
|-
+
| 0561S    ||  Park            || Green fill
+
|-
+
| 0564S    ||  Sports          || Green fill
+
|-
+
| 0567P/0567S || Leisure
+
|-
+
| 0570S    ||  Water treatment
+
|-
+
| 0573S    ||  Waste treatment
+
|-
+
| 0576S    ||  Depot
+
|-
+
|colspan=2 | '''Transportation'''
+
|-
+
| 0601L    ||  '''Motorway'''      || 4px yellow line, with 1px red casing and 1px centerline
+
|-
+
| 0604L    ||  '''Road'''          || 3px orange, green or yellow line (depends on CFUN_0604 field) with 1px black casing
+
|-
+
| 0607L    ||  '''Motorway/road link''' || Depends on TIPO_0607 field: 2px red, orange, green or yellow line with 1px black or red casing.
+
|-
+
| 0610L   ||  '''Track'''          || 1px dashed brown line
+
|-
+
| 0613S    ||  Parking/service area
+
|-
+
| 0614P    ||  Fuel station
+
|-
+
| 0617P    ||  Road Milestone
+
|-
+
| 0620L    ||  '''Street'''        || 1px grey line
+
|-
+
| 0623L    ||  '''Path'''          || 1px dashed black line
+
|-
+
| 0626L    ||  Footway
+
|-
+
| 0629L    ||  Cycleway
+
|-
+
| 0632L    ||  Route
+
|-
+
| 0635L    ||  [http://es.wikipedia.org/wiki/Vía_pecuaria Cattleway]
+
|-
+
| 0638L    ||  Hi-speed rail        || 3px black line, with "X" on it  ----X----
+
|-
+
| 0641L    ||  Conventional rail    || 3px black line
+
|-
+
| 0644L    ||  Special rail          || 3px black line, with vertical lines on it
+
|-
+
| 0647L    ||  Aerialway
+
|-
+
| 0650S    ||  Train station
+
|-
+
| 0653S    ||  Rail Milestone        || 5px circle, label with field ETIQUETA
+
|-
+
| 0656L    ||  Seaport
+
|-
+
| 0659P/0659S || Beacon/bouy
+
|-
+
| 0662S    ||  Airport Runway
+
|-
+
| 0665S    ||  Airport Apron
+
|-
+
|colspan=2 | '''Power'''
+
|-
+
| 0701L    ||  Fuel pipeline
+
|-
+
| 0704P    ||  Fuel extraction
+
|-
+
| 0707S    ||  Fuel depot
+
|-
+
| 0710L    ||  Power line
+
|-
+
| 0713S    ||  Power plant
+
|-
+
| 0716P    ||  Power tower
+
|-
+
| 0719S    ||  Power substation
+
|-
+
| 0725P    ||  Antenna
+
|-
+
|colspan=2 | '''Toponyms & extra'''
+
|-
+
| 0801P    ||  '''Toponym w/o geometry'''    || Label with field ETIQUETA
+
|-
+
| 0802P    ||  '''Toponym w/ geometry'''     || Label with field ETIQUETA
+
|-
+
| 0803L    ||  '''Mountain range toponym'''  || Label with field ETIQUETA
+
|-
+
| 0901S    ||  Sheet border
+
|-
+
| 1001P    ||  Geodetic survey/triangulation point  || Triangle with dot in center
+
 
|}
 
|}
 +
 +
=== Rendering notes ===
 +
 +
This is by no means neccesary, but you might receive a penalty* if your rendering hits any of the following common pitfalls:
 +
<div style='font-size:70%'>* The penalty is that Iván will '''not''' buy you a beer during FOSS4G. See, this is a friendly competition, but we can play rough :-P <br/> And, in order to make things more interesting, the team which renders the map in the most beautiful way will get one metre of beer for free (probably in the [http://www.barnosweat.com/ "no sweat" pub])</div>
 +
 +
* Overlapping labels. Your software has text collision detection, hasn't it?
 +
* Anti-alias. Who does ''not'' use antialias nowadays?
 +
* Labels on linear features (e.g. river names, motorway names, contour elevation values) should follow the line geometry. Every letter tilted at the same angle = failure.
 +
* Automatically cast float or double-float fields to int (e.g. the COTA_201 field should render as "310" instead of as "310.000000"). This is currently a bug on [http://trac.osgeo.org/mapserver/ticket/60 mapserver] and [http://trac.mapnik.org/ticket/430 mapnik].
 +
* Rendering ''any'' road casing on top of ''any'' road fill. This means that the fill of a road link has precedence over the border of a motorway.
 +
 +
[[image:paintersalgorithm.jpg]]
 +
 +
=== Ideal rendering ===
 +
 +
In an ideal world where money grows on trees and the streets are made out of candy, the development teams should have unlimited time to work on the map rendering.
 +
 +
Ideally, the rendering should be the same as the official topographic maps. You can download samples from the IGN (just follow the above instructions, but select '''MTN25RASTER''' instead of '''BCN25/BTN25''').
 +
 +
As you may see, the rendering rules can become very complex, and be non-intuitive at first. This is a performance benchmark, not a beauty one, so teams should focus on performance, and not pixel-to-pixel accuracy.
 +
 +
For reference, the legend of the topo map looks like this:
 +
 +
[[image:bcn25_btn25_legend.jpg|800px]]

Latest revision as of 01:01, 12 August 2010

How to download sample data

The datasets will require some time to be merged and prepared, and the simbology still isn't fully decided on. In the meantime, you can download some sample data by following these steps:

This is the website where the Spanish National Mapping Agency publishes some datasets


  • On the top of the page, hit the Welcome link to enter the english version of the page


  • Register for a new user. You'll need to enter the desired username, password, repeat password, full name and surname, email, and solve a captcha.


  • Enter your account details to log in.



  • In the "products" drop-down menu, select either BCN25-BTN25 for vector data, or Ortofoto PNOA Máxima Actualidad for aerial imagery.


  • In the "MTN50 sheet number", enter any number between 1 and 1108.
Barcelona is 420-421; Madrid is 559. You may want to check a sheet reference (caution: sheet reference is a 17MB image)


  • Hit "See list of products". Select a file to download. You will see the license for the data, which boils down to "do not make any commercial use of this data" and "say that the data comes from the IGN"


  • You will see a survey. Hit "No enviar y continuar con descarga"


  • Hit "Click here yo begin download"


Raster data issues

Remember that the baseline of the OSGeo Benchmark for raster data are GeoTIFF files, but note you can only download ECW files. We will be converting the ECWs to GeoTIFFs.

There will be one big file for each one of the sheets in the following diagram. The area covers the whole Catalonia, which is about 32,114 km2 (12,399.3 sq mi):

Cataluña mtn50 sheets.png

Vector data issues

Once unzipped, a sheet of vector data contains lots of shapefiles. The shapefiles will be merged, and most probably only the most interesting themes will be used.

Please note that the shapefiles are in ETRS89 + UTM28N/29N/30N/31N. The final shapefiles will be in WGS84, so you're encouraged to reproject them if you think it's neccesary for your testing.

A letter after the theme code explains what kind of geometry the shapefile contains. P stands for Point; L stands for Line; S stands for Surface (Polygon).

Only the following layers will be used:

Code Theme How should it be rendered Sample rendering
Polygon
0501S.shp Settlement #C0C0C0 fill ;rendered under any other features

Optionally, use the field HABITANTES_501 to choose between 15 different fill images

0507S.shp Building
SINGU_0507 = 01 #FFACAC fill (normal building)
SINGU_0507 = 02 #FF7878 fill (singular building - e.g. historic relevance)

render at scales < 30,000

Btn25 residential.png
0513S.shp Industry #DB71FF fill, render at scales < 30,000 Btn25 industrial.png
Line
0201L.shp Contour lines
CATEG_0201 = 01 1px solid #E6B777 (normal contour line)
CATEG_0201 = 02 1px solid #BF8F2E (master contour line)
CATEG_0201 = 03 do now draw (auxiliary contour line)

render at scales < 30,000

Btn25 cont.png
0601L.shp Motorway
TIPO_0601 = 01 4px yellow (#FFFF00) line, with 2px red (#FF0000) casing and 1px red (#FF0000) centerline (autopista / motorway)
TIPO_0601 = 03 4px white (#FFFFFF) line, with 2px red (#FF0000) casing and 1px red (#FF0000) centerline (autovía / motorroad)
Btn25 roads.png Btn25 roads legend.png
0604L.shp Road 3px orange, green or yellow line (depends on CFUN_0604 field) with 1px black casing
COMPE_0604 = 01 3px red (#FF0000) line, with 1px black (#000000) casing (carretera nacional / trunk road)
COMPE_0604 != 01 and CFUN_0604 = 01 3px orange (#ffb501) line, with 1px black (#000000) casing (carretera autonómica de 1er orden / primary road)
COMPE_0604 != 01 and CFUN_0604 = 02 3px green (#00d700) line, with 1px black (#000000) casing (carretera autonómica de 2º orden / secondary road)
COMPE_0604 != 01 and CFUN_0604 = 03 3px yellow (#FFFF00) line, with 1px black (#000000) casing (carretera autonómica de 3er orden / tertiary road)
0607L.shp Motorway/road link
TIPO_0607 = 01 Like autopistas (motorway), but half width
TIPO_0607 = 02 Like autovías (motorroad), but half width
TIPO_0607 = 03 Like carretera nacional (trunk road), but half width
TIPO_0607 = 04 Like carreteras de 1er nivel (primary roads), but half width
TIPO_0607 = 05 Like carreteras de 2º nivel (secondary roads), but half width
TIPO_0607 = 06 Like carreteras de 3er nivel (tertiary roads), but half width
TIPO_0607 = 07 Roundabout - like tracks, but half width
0610L.shp Track 2px grey (#808080) line, 1px black (#000000) casing
Point
0801P.shp Toponym w/o geometry Label with field ETIQUETA; font size, weight and italics depending on field TIPO; maybe icon depending on TIPO; render at scales < 50,000 Btn25 topo.png
0802P.shp Toponym w/ geometry Label with field ETIQUETA; font size, weight and italics depending on field TIPO; maybe icon depending on TIPO; render at scales < 50,000

Rendering notes

This is by no means neccesary, but you might receive a penalty* if your rendering hits any of the following common pitfalls:

* The penalty is that Iván will not buy you a beer during FOSS4G. See, this is a friendly competition, but we can play rough :-P
And, in order to make things more interesting, the team which renders the map in the most beautiful way will get one metre of beer for free (probably in the "no sweat" pub)
  • Overlapping labels. Your software has text collision detection, hasn't it?
  • Anti-alias. Who does not use antialias nowadays?
  • Labels on linear features (e.g. river names, motorway names, contour elevation values) should follow the line geometry. Every letter tilted at the same angle = failure.
  • Automatically cast float or double-float fields to int (e.g. the COTA_201 field should render as "310" instead of as "310.000000"). This is currently a bug on mapserver and mapnik.
  • Rendering any road casing on top of any road fill. This means that the fill of a road link has precedence over the border of a motorway.

Paintersalgorithm.jpg

Ideal rendering

In an ideal world where money grows on trees and the streets are made out of candy, the development teams should have unlimited time to work on the map rendering.

Ideally, the rendering should be the same as the official topographic maps. You can download samples from the IGN (just follow the above instructions, but select MTN25RASTER instead of BCN25/BTN25).

As you may see, the rendering rules can become very complex, and be non-intuitive at first. This is a performance benchmark, not a beauty one, so teams should focus on performance, and not pixel-to-pixel accuracy.

For reference, the legend of the topo map looks like this:

Bcn25 btn25 legend.jpg