Skip to content

Commit

Permalink
update data
Browse files Browse the repository at this point in the history
  • Loading branch information
westnordost committed Jun 9, 2023
1 parent aaa13d3 commit b23fc9a
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,9 @@ The default data file is in `/data/`. Don't forget to give attribution when dist
## Data

What exactly is returned when calling `getIds` is dependent on the source data used. The default data in `/data/` is generated from [this file in the JOSM project](https://josm.openstreetmap.de/export/HEAD/josm/trunk/resources/data/boundaries.osm). It...
- uses ISO 3166-1 alpha-2 country codes where available and otherwise ISO 3166-2 for subdivision codes. The data set currently includes all subdivisions only for the 🇺🇸 United States, 🇨🇦 Canada, 🇦🇺 Australia, 🇨🇳 China, 🇮🇳 India, 🇫🇲 Micronesia and 🇧🇪 Belgium plus a few subdivisions for other countries. See the source file for details
- uses ISO 3166-1 alpha-2 country codes where available and otherwise ISO 3166-2 for subdivision codes
- is oblivious of sea borders and will only return correct results for geo positions on land. If you are a pirate and want to know when you reached international waters, don't use this data!
- includes all subdivisions for 🇺🇸 United States, 🇨🇦 Canada, 🇦🇺 Australia, 🇨🇳 China, 🇮🇳 India, 🇪🇸 Spain, 🇬🇧 United Kingdom, 🇧🇪 Belgium, 🇧🇦 Bosnia & Herzegovina, 🇫🇲 Micronesia, 🇰🇲 Comoros and [autonomous subdivisions of most other countries](https://en.wikipedia.org/wiki/List_of_autonomous_areas_by_country) that have a ISO 3166-2 code, such as the republics within 🇷🇺 Russia, the autonomous regions in 🇮🇹 Italy, in 🇮🇩 Indonesia etc.

You can import own data from a GeoJson or an OSM XML, using the Java application in the `/generator/` folder. This is also useful if you want to have custom raster sizes. What are rasters? See below.

Expand Down
Binary file modified data/boundaries180x90.ser
Binary file not shown.
Binary file modified data/boundaries360x180.ser
Binary file not shown.
Binary file modified data/boundaries60x30.ser
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,9 @@ else if(filename.endsWith(".osm"))
}

Set<String> excludeCountries = new HashSet<>();
excludeCountries.add("FX");
excludeCountries.add("EU");
excludeCountries.add("FX"); // "metropolitan France" is not a country
excludeCountries.add("EU"); // not a country
excludeCountries.add("AQ"); // not a country

List<Geometry> geometryList = new ArrayList<>(geometries.getNumGeometries());
for (int i = 0; i < geometries.getNumGeometries(); i++)
Expand Down
Binary file modified sampleapp/src/main/assets/boundaries180x90.ser
Binary file not shown.

0 comments on commit b23fc9a

Please sign in to comment.