Code Monkey home page Code Monkey logo

osm-snap's Introduction

osm-snap

Flattens the ways from OpenStreetMap XML into datamaps format.

Example

$ curl -O https://s3.amazonaws.com/metro-extracts.mapzen.com/indianapolis.osm.bz2
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
				 Dload  Upload   Total   Spent    Left  Speed
100 15.7M  100 15.7M    0     0  1321k      0  0:00:12  0:00:12 --:--:-- 1394k
$ make
cc -g -Wall -O3 -o snap snap.c -lexpat
$ bzcat indianapolis.osm.bz2 | ./snap | ../datamaps/encode -z20 -o indianapolis.dm
...
Sorting 1 shapes of 7 point(s), zoom level 22
Sorting part 1 of 1
Sorting 1 shapes of 3 point(s), zoom level 28
Sorting part 1 of 1
Sorting 1 shapes of 7 point(s), zoom level 23
Sorting part 1 of 1
Merging: 100%
$ ../datamaps/render indianapolis.dm 14 4271 6210 > broadripple.png

osm-snap's People

Contributors

e-n-f avatar

Stargazers

Drew Bollinger avatar

Watchers

James Cloos avatar  avatar  avatar

Forkers

fagan2888

osm-snap's Issues

'tmpnam' is deprecated

Not sure if you care about maintaining this but here was my warning when running the makefile:

cc -g -Wall -O3 -o snap snap.c -lexpat
snap.c:230:6: warning: 'tmpnam' is deprecated: This function is provided for compatibility reasons only. Due to security concerns
  inherent in the design of tmpnam(3), it is highly recommended that you use    mkstemp(3) instead. [-Wdeprecated-declarations]
  if (tmpnam(tmpfname) == NULL) {
      ^
/usr/include/stdio.h:274:7: note: 'tmpnam' declared here
char    *tmpnam(char *);
         ^
1 warning generated.

I'll try to be more helpful with feedback in the future but I don't know C.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.