e-n-f / datamaps

Indexes points and lines and generates map tiles to display them
BSD 2-Clause "Simplified" License
341 stars 53 forks source link

[Question] Readme lacking information? #5

Closed manugarri closed 10 years ago

manugarri commented 10 years ago

EDIT: Please delete the question. I just had to do "make" to compile everything using the makefile.

ORIGINAL:

I have almost no knowledge of C at all , and I am trying to follow the Readme in order to make a map as cool as yours.

so right now, i've followed these steps:

1.clone this repo git clone https://github.com/ericfischer/datamaps.git

  1. cd datamaps

  2. mkdir output_folder
  3. copy in the /datamaps folder a txt file following this structure:

    lat,lon lat,lon lat,lon ...

    cat file.txt | ./encode -o output_folder -z 16

however, i get the following error.

-bash: ./encode: No such file or directory

I guessed it is because encode.c is not compiled.

Then I tried compiling it doing: gcc encode.c -o encode

and that throws another error:

/tmp/ccTwkJ7r.o: In function `read_file':
encode.c:(.text+0x589): undefined reference to `latlon2tile'
encode.c:(.text+0x750): undefined reference to `bytesfor'
encode.c:(.text+0x822): undefined reference to `xy2buf'
encode.c:(.text+0x87a): undefined reference to `xy2buf'
encode.c:(.text+0x8df): undefined reference to `meta2buf'
/tmp/ccTwkJ7r.o: In function `main':
encode.c:(.text+0x12c1): undefined reference to `bytesfor'
encode.c:(.text+0x12d3): undefined reference to `gSortBytes'
encode.c:(.text+0x163d): undefined reference to `bufcmp'
collect2: error: ld returned 1 exit status

Any help on what I am doing wrong and how to make the maps would help me a lot!

e-n-f commented 10 years ago

Thanks for the question. I'm glad you figured out how to use "make" to compile it. The reason for the error when you just use gcc is that encode.c doesn't stand alone—it also uses code from util.c.

iamnicoleross commented 10 years ago

Thanks Eric, I am so lost with a lot of this new Technology stuff,I have a long way to go but doing my best! Thanks so Much

-----Original Message----- From: Eric Fischer notifications@github.com To: ericfischer/datamaps datamaps@noreply.github.com Sent: Thu, Apr 17, 2014 12:10 am Subject: Re: [datamaps] [Question] Readme lacking information? (#5)

Thanks for the question. I'm glad you figured out how to use "make" to compile it. The reason for the error when you just use gcc is that encode.c doesn't stand alone—it also uses code from util.c. — Reply to this email directly or view it on GitHub.

springmeyer commented 10 years ago

Pull request at #6 that adds detail to the readme about using make and what dependencies you need before trying to run it.