This file contains hidden or 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
# Normal command on a country-file. | |
osm2pgsql --create --hstore --slim -U postgres -d osm-country -H localhost --style openstreetmap-carto.style country.osm.pbf | |
# Command for planet-wide import. | |
osm2pgsql --create --number-processes 6 --flat-nodes /tmp/flat_nodes.bin --cache 8000 --hstore --slim -U postgres -W -d osm-world -H localhost --style openstreetmap-carto.style ~/planet-latest.osm.pbf |
This file contains hidden or 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
#!/bin/sh | |
find "$2" -type f -exec sh -c 'cmp --silent "{}" "$1"; if [ $? -eq 0 ]; then rm "{}"; fi' \; |
This file contains hidden or 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
Rectangle rectangle = (Rectangle)shape; | |
Vector2 center = new Vector2(); | |
rectangle.getCenter(center); | |
Affine2 transform = new Affine2(); | |
transform.translate(rectangle.x, rectangle.y + rectangle.height); | |
transform.rotate(-rotation); | |
transform.translate(-rectangle.x, -rectangle.y - rectangle.height); | |
transform.applyTo(center); |
This file contains hidden or 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
Rectangle rectangle = (Rectangle)shape; | |
Vector2 center = new Vector2(); | |
rectangle.getCenter(center); | |
float centerX = center.x - rectangle.x; | |
float centerY = center.y - rectangle.y - rectangle.height; | |
float cos = MathUtils.cosDeg(rotation); | |
float sin = MathUtils.sinDeg(rotation); | |
float x = centerX * cos + centerY * sin; |
NewerOlder