Simon90 / mapserver-utils

Automatically exported from code.google.com/p/mapserver-utils
0 stars 1 forks source link

Add OSM_DB_CONNECTION param to Makefile #12

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
It's not possible to configure db_connection when calling Makefile

Add OSM_DB_CONNECTION param like OSM_EXTENTS

Original issue reported on code.google.com by xavier.c...@gmail.com on 8 Mar 2012 at 12:24

GoogleCodeExporter commented 9 years ago
This parameter is configured in generate_style.py, do you absolutely need it in 
the Makefile ?

Original comment by thomas.bonfort@gmail.com on 8 Mar 2012 at 12:26

GoogleCodeExporter commented 9 years ago
Maybe not in the makefile, but I'd like to configure it without modifying files.
It would be great to set this param in the command line.

Original comment by xavier.c...@gmail.com on 8 Mar 2012 at 12:31

GoogleCodeExporter commented 9 years ago
I'll commit the change if you prepare a patch then ...

Original comment by thomas.bonfort@gmail.com on 8 Mar 2012 at 12:33

GoogleCodeExporter commented 9 years ago
Is this patch ok for you ?

It containes 2 updates : 
 * add OSM_DB_CONNECTION as a Makefile param => defaut "host=localhost dbname=osm user=osm password=osm port=5432"
 * OSM_WMS_SRS needs to be quoted 2 times when passing to makefile 
  -> before :`make ... OSM_WMS_SRS='"EPSG:2154 EPSG:4326"' (double quotes needs to be written in the mapfile)`
  -> after : `make ... OSM_WMS_SRS='EPSG:2154 EPSG:4326' (double quotes are added in the generation process)`

== Tests : 
`make OSM_WMS_SRS='EPSG:2154 EPSG:4326'`  => mapfile : `"wms_srs" "EPSG:2154 
EPSG:4326"`
`make => mapfile` : `"wms_srs" "EPSG:900913 EPSG:4326 EPSG:3857 EPSG:2154 
EPSG:310642901 EPSG:4171 EPSG:310024802 EPSG:310915814 EPSG:310486805 
EPSG:310702807 EPSG:310700806 EPSG:310547809 EPSG:310706808 EPSG:310642810 
EPSG:310642801 EPSG:310642812 EPSG:310032811 EPSG:310642813 EPSG:2986"`

`make OSM_DB_CONNECTION='host=127.0.0.1 dbname=osm user=osm password=osm 
port=5432'`  => mapfile : `CONNECTION "host=127.0.0.1 dbname=osm user=osm 
password=osm port=5432"`
`make` => mapfile : `CONNECTION "host=localhost dbname=osm user=osm 
password=osm port=5432"`

Original comment by xavier.c...@gmail.com on 8 Mar 2012 at 5:18

Attachments:

GoogleCodeExporter commented 9 years ago
seems fine to me, will commit tomorrow,

thanks

Original comment by thomas.bonfort@gmail.com on 8 Mar 2012 at 5:54

GoogleCodeExporter commented 9 years ago
thanks

Original comment by xavier.c...@gmail.com on 8 Mar 2012 at 5:58

GoogleCodeExporter commented 9 years ago
Is it possible to commit the patch ?

Original comment by xavier.c...@gmail.com on 16 May 2012 at 6:44

GoogleCodeExporter commented 9 years ago
oups sorry, completely forgot.

FTR, I'm not maintaining this codebase anymore, the updated (and much faster :) 
) mapfiles can be found at https://github.com/tbonfort/mapserver-osm . 

If you want to continue using and maintaining this version with googlecode/svn, 
I'm fine with giving you commit access to the repo. You can otherwise submit 
pull requests from the github repo.

--
thomas

Original comment by thomas.bonfort@gmail.com on 16 May 2012 at 6:50

GoogleCodeExporter commented 9 years ago
I'll take a look at the new project.

Original comment by xavier.c...@gmail.com on 16 May 2012 at 6:58