Osmosis/Polygon Filter File Format
From OpenStreetMap
< Osmosis
Osmosis polygon filter file format
This is an example of the Osmosis polygon filter file format as referenced by the Osmosis bounding polygon task.
australia_v
1
0.1446763E+03 -0.3825659E+02
0.1446693E+03 -0.3826255E+02
0.1446627E+03 -0.3825661E+02
0.1446763E+03 -0.3824465E+02
0.1446813E+03 -0.3824343E+02
0.1446824E+03 -0.3824484E+02
0.1446826E+03 -0.3825356E+02
0.1446876E+03 -0.3825210E+02
0.1446919E+03 -0.3824719E+02
0.1447006E+03 -0.3824723E+02
0.1447042E+03 -0.3825078E+02
0.1446758E+03 -0.3826229E+02
0.1446693E+03 -0.3826255E+02
END
!2
0.1422483E+03 -0.3839481E+02
0.1422436E+03 -0.3839315E+02
0.1422496E+03 -0.3839070E+02
0.1422543E+03 -0.3839025E+02
0.1422574E+03 -0.3839155E+02
0.1422467E+03 -0.3840065E+02
0.1422433E+03 -0.3840048E+02
0.1422420E+03 -0.3839857E+02
0.1422436E+03 -0.3839315E+02
END
END
- The first line contains the name of the file.
- The second line contains a name which begins a section defining an individual polygon.
- The third and subsequent lines in the section contain the coordinates of the polygon points in the order longitude, latitude, separated by whitespace. By convention, the coordinates are represented in scientific notation, but Osmosis is flexible about the actual numeric representation.
- The last line of the polygon section may repeat the starting point to close the circuit. If it is omitted a closing line will be drawn to the start point. If your polygon contains a centroid as the first point, the last line of your polygon section should complete the path to the actual polygon starting point.
- The polygon section is closed by the text "END" on a line by itself.
- The polygon section name may optionally be prefixed with "!" to subtract the polygon. The section(s) containing the larger area from which to subtract should be listed first. All the polygon sections are combined together to create the final filter area.
- If you want to create a filter area which spans the antimeridian (+/-180 degrees), split the polygon at the antimeridian and create additional polygon sections which continue the desired area on the other side.
- The file is closed by another "END" on a line by itself.

