stamen / terrain-classic

World-wide CartoCSS port of Stamen's classic terrain style
ISC License
144 stars 35 forks source link

Error when trying to run 'make db/shared' #52

Open berengerzyla opened 8 years ago

berengerzyla commented 8 years ago

Hi! I have the same issue as https://github.com/stamen/toner-carto/issues/36 . Installed everything.

export DATABASE_URL='postgis:///terrain-classic' make .env The .env file is there. make link, OK. make db, OK, it creates the DB. After that, the database is there and I can connect to it. It's empty. make db/shared gives me the same errors as @jbcima .

psql:sql/functions/highroad.sql:1: NOTICE:  view "highroad_z15plus" does not exist, skipping
psql:sql/functions/highroad.sql:2: NOTICE:  view "highroad_z14" does not exist, skipping
psql:sql/functions/highroad.sql:3: NOTICE:  view "highroad_z13" does not exist, skipping
psql:sql/functions/highroad.sql:4: NOTICE:  view "highroad_z12" does not exist, skipping
psql:sql/functions/highroad.sql:5: NOTICE:  view "highroad_z11" does not exist, skipping
psql:sql/functions/highroad.sql:6: NOTICE:  view "highroad_z10" does not exist, skipping
psql:sql/functions/highroad.sql:26: ERROR:  relation "**osm_planet_osm_line_z10**" does not exist
LINE 18:       FROM osm_planet_osm_line_z10
                    ^
make: *** [db/functions/highroad] Error 3

Any idea from where it could come from? The README doesn't mention anything else before make db/shared.

If I try to keep going anyway, and do a make db/seattle, I get a

make: *** No rule to make target `data/aries/z4to10.json', needed by `db/aries'.  Stop.

All dependencies installed. imposm3 version 0.1 Ubuntu 14.04.4 LTS

Thank you!

clhenrick commented 8 years ago

@iambz You should have DATABASE_URL='postgres:///terrain-classic' in .env Not sure why you have DATABASE_URL='postgis:///terrain-classic'; postgis: instead of postgres being the key difference there.

Other than that there may be a difference between Mac OSX and Ubuntu that we haven't accounted for.

clhenrick commented 8 years ago

@iambz I just ran into this, if you try doing make db/[place] where [place] is a place listed in the Makefile such as CA then it will first download an OSM extract, created a db with it specified in DATABASE_URL, and also install the shared data tables.

Let us know if this fixes your issue.

JosephTRichardson commented 2 years ago

I am having this same issue, exact same error message. Running on Mac OS X 12.1 Monterey. I'm very much a noob when it comes to Postgis, TileBox, and this whole shebang, but I would appreciate some help. I am trying to set up terrain for the whole world.

almccon commented 2 years ago

Sorry @LonelyPilgrim, it has been a long time since any of us at Stamen have tried using this code. It's many years old and we don't really use it anymore for our work. I can't guarantee that it would still work, even if we figured out the solution to this particular bug.

For this bug, at least (which is perhaps the same error as https://github.com/stamen/toner-carto/issues/36, which also remains unresolved) your best bet is to try to figure out what steps in the Makefile are failing, so you can research what's going on which that particular part of the install process (whether it relates to downloading data files, or creating tables in Postgres/PostGIS, or something else) needs to be resolved.

The "good" thing is that the Makefile is just running a series of command line instructions, and you could also run some or all of those same instructions yourself, or slightly modify the commands as needed for the the unique situation of your own computer.

I know this doesn't really fix your problem, I'm just trying to give you some pointers to figure it out yourself, hopefully. I hope this helps a little bit.

JosephTRichardson commented 2 years ago

Thanks for reply, @almccon. Is there a newer solution you would suggest? My clients were impressed with the map at http://maps.stamen.com/terrain/ and wanted to re-create something like it, something open-source on a closed network without internet access. In the time, I will try your suggestions.

JosephTRichardson commented 2 years ago

I know you are busy with other projects, but if you might have time to answer a couple of basic noob questions, I would greatly appreciate it. I believe I have postgis and TileMill installed. But what actually is the map data, where does it come from, and how do I know if I have it? There is nothing being imported into postgres, and I'm not even what certain what data it is trying to import.

EDIT: Ok, I suppose terrain-classic is a "map style" and the actual map data is the OpenStreetMap data. If I'm planning to run an offline server, I suppose I need that OSM data, which I'm downloading. I found the curl requests in the Makefile. Is this the only data that terrain-classic needs, or, under normal circumstances, connected to the internet, is it reading OSM data on the fly?

EDIT: And part of my problem is likely that those curl URLs don't actually work. 🤔