[mapserver-users] Phpmapscript doesn't work with Postgis

2009-03-30 Thread Juanma M. R.
Hi list,

We are migrating our servers to a new server based on Centos and we are
suffering problems with the use of phpmapscript.

Postgis is working correctly when accessing from php but it fails when
executing the code bellow (our script is more complicated but I have removed
the other issues just to check what is failling and aboid side effect from
our code). The problem is that mapserver as cgi works correctly with the
same map file and the same layer and mapscript is compiled at the same time
than mapserver with postgis support (--with-php in the mapserver configure
options). The apache logs shows an Unexpected process ending with
Segmentation fault (11) error. The PostGIS log just sais that the connection
was broken unexpected by the client but doesn't give more details.

If anyone have any sugestion to follow up the testing and debugging, any
other way to try to find the problem or at least more details about what
could be failling, because we have no more ideas to get any clue about what
is happening.

Our configuration:

Mapserver 4.10.2
Postgres 8.3.5
PHP 5.2.6
Centos  5.2

Here is the layer declaration of the map file:

LAYER
NAME "postgislayer"
CONNECTIONTYPE postgis
CONNECTION "host=localhost user= password=* dbname=*"
DATA "wkb_geometry from postgislayer using unique ogc_fid using SRID=32629"
STATUS ON
TYPE polygon
CLASS
COLOR 0 0 255
OUTLINECOLOR 0 0 255
END
PROJECTION
"init=epsg:32629"
 END
METADATA
"wms_title" "Test Layer"
"wms_srs" "epsg:32629"
END
END


My php code is as follows (just the wms wrapper from mapserver
documentation):

 $value)
{
$req_cgi->setparameter($key, $value);
}
}
else
{
foreach ($_GET as $key => $value)
{
$req_cgi->setparameter($key, $value);
}
}
ms_ioinstallstdouttobuffer();
$oMap = ms_newMapobj($req_cgi->getvaluebyname("map"));
$oMap->owsdispatch($req_cgi);
//$contenttype = ms_iostripstdoutbuffercontenttype();
if ($contenttype == '') header('Content-type: image/png');
else
{
$header = 'Content-type: '.$contenttype;
header($header);
}
ms_iogetStdoutBufferBytes();
ms_ioresethandlers();
?>
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] Support to KMZ in Mapserver

2014-02-17 Thread Juanma M. R.
Dear list,

I am trying to compile mapserver with KMZ support.

I have tried with both, mapserver 6.02 and Mapserver 6.4. The main problem
is:

* How should I add support to KMZ in Mapserver? I have tried compiling from
trunk libkml (as explain here  and
here ) but I didn't
manage to do it. Is this the correct way or is there a more simplified
method?

Cheers,
Juan Manuel Moreno Rivera.

Sección de Teledetección y SIG / Remote Sensing & GIS group

Instituto de Desarrollo Regional / Institute for Regional Development

Universidad de Castilla-La Mancha / University of Castilla-La Mancha

Tlf: +34 967599200 (Ext: 2623)
http://www.teledeteccionysig.es/
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] Support to KMZ in Mapserver

2014-02-17 Thread Juanma M. R.
Hi again,

Finally I got the KML support working in gdal 1.10 and so I am trying now
to compile mapserver against it to get the KMZ support. I am trying to
compile 6.0.2 version but still there are problems with GDAL. After
compiling GDAL I configure Mapserver with the following parameters:

sudo ./configure --with-proj --with-geos=/usr/local/bin/geos-config
--with-ogr=/usr/local/bin/gdal-config
--with-postgis=/usr/local/pgsql/bin/pg_config
--with-curl-config=/usr/bin/curl-config
--with-httpd=/usr/local/apache2/bin/httpd
--with-php=/usr/local/php-5.2.2 --enable-point-z-m
--with-png=/usr/local/include/libpng16/
--with-libiconv-dir=/usr/local/libiconv-1.12 --with-gd --with-jpeg
--with-tiff --with-xpm --with-wfs --with-wcs --with-wmsclient
--with-wfsclient  --with-gdal=/usr/src/gdal-1.10.1/apps/gdal-config
--with-kml

It starts compiling but when compiling the shp2img tool it throws the
following error:


sudo make

g++ -O2 -fPIC -Wall  -DNDEBUG   -DUSE_POINT_Z_M -DHAVE_VSNPRINTF
-DNEED_STRLCPY -DNEED_STRLCAT -DNEED_STRRSTR-DUSE_POINT_Z_M
-DUSE_WMS_LYR -DUSE_WFS_LYR  -DUSE_LIBXML2 -DUSE_CURL
-DUSE_CURLOPT_PROXYAUTH -DUSE_KML -DUSE_WCS_SVR -DUSE_WFS_SVR -DUSE_WMS_SVR
  -DUSE_POSTGIS -DPOSTGIS_HAS_SERVER_VERSION -DUSE_GDAL -DUSE_OGR
-DUSE_GEOS   -DUSE_PROJ -DUSE_AGG_SVG_SYMBOLS-DUSE_GD_GIF -DUSE_GD_PNG
-DUSE_GD_JPEG -DUSE_GD_WBMP -DUSE_GD_FT -DGD_HAS_FTEX_XSHOW
-DGD_HAS_GDIMAGEGIFPTR -DGD_HAS_GETBITMAPFONTS
-DGD_HAS_GET_TRUE_COLOR_PIXEL -DUSE_ICONV -DUSE_GIF -DUSE_PNG
 -DUSE_FREETYPE   -DDISABLE_CVSID -I/usr/include/freetype2
 -I/usr/local/include/libpng16/   -I/usr/include -Irenderers/agg/include
-I/usr/src/gdal-1.10.1/port -I/usr/src/gdal-1.10.1/gcore
-I/usr/src/gdal-1.10.1/alg -I/usr/src/gdal-1.10.1/ogr
-I/usr/src/gdal-1.10.1/ogr/ogrsf_frmts -I/usr/src/gdal-1.10.1/frmts/vrt
-I/usr/local/pgsql/include-I/usr/local/include
 -I/usr/include/libxml2   shp2img.o  -L. -lmapserver -lfreetype -lgd
-L/usr/lib64 -lgd -ljpeg -lfreetype -L/usr/local/include/libpng16/ -lpng
-L/lib64 -lz -lXpm -lX11  -lexpat   -lproj -ljpeg
-L/usr/local/include/libpng16/ -lpng -lgif
/usr/src/gdal-1.10.1/libgdal.la-L/usr/local/pgsql/lib -lpq
-L/usr/kerberos/lib64 -lcurl -ldl
-lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lidn -lssl -lcrypto -lz
 -L/usr/local/lib -lgeos_c  -liconv-L/lib64 -lz -lxml2 -lz -lm  -lm
-lstdc++-o shp2img

/usr/src/gdal-1.10.1/libgdal.la: file not recognized: File format not
recognized

collect2: ld devolvió el estado de salida 1

make: *** [shp2img] Error 1

I have checked that the gdal binaries are from a make after a make clean
(to avoid corruption) but it did not sort out the problem. Could anyone
give a key for solving this problem?

Cheers,

Juan Manuel Moreno Rivera.

Sección de Teledetección y SIG / Remote Sensing & GIS group

Instituto de Desarrollo Regional / Institute for Regional Development

Universidad de Castilla-La Mancha / University of Castilla-La Mancha

Tlf: +34 967599200 (Ext: 2623)
http://www.teledeteccionysig.es/


2014-02-17 11:09 GMT+01:00 Juanma M. R. :

> Dear list,
>
> I am trying to compile mapserver with KMZ support.
>
> I have tried with both, mapserver 6.02 and Mapserver 6.4. The main problem
> is:
>
> * How should I add support to KMZ in Mapserver? I have tried compiling
> from trunk libkml (as explain here<http://www.gdal.org/ogr/drv_libkml.html>and
> here <https://code.google.com/p/libkml/wiki/UserGuide01x>) but I didn't
> manage to do it. Is this the correct way or is there a more simplified
> method?
>
> Cheers,
> Juan Manuel Moreno Rivera.
>
> Sección de Teledetección y SIG / Remote Sensing & GIS group
>
> Instituto de Desarrollo Regional / Institute for Regional Development
>
> Universidad de Castilla-La Mancha / University of Castilla-La Mancha
>
> Tlf: +34 967599200 (Ext: 2623)
> http://www.teledeteccionysig.es/
>
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

[mapserver-users] Geotiff OUTPUTFORMAT fails in browse mode

2014-02-19 Thread Juanma M. R.
Dear all,

I am trying to generate a georeferenced image with Mapserver. Now I am
trying to do it with GeoTIFF.

The issue is that all the outputformats are working in browse mode but
GeoTiff. However, if I change to map mode, the URL request works and gives
back the tiff data in stream to the browser.

Is there any reason to GeoTIFF not working in browse mode, writting a file
in the temporal folder from the server?

My outputformat in .map file:

OUTPUTFORMAT
  NAME GEOTIFF_16
  DRIVER "GDAL/GTiff"
  MIMETYPE "image/tiff"
  IMAGEMODE RGB
  EXTENSION "tif"
END

I have checked the compilation of mapserver having the --with-tiff in both
cases. And it is ok but the

./mapserv -v

returns:

MapServer version 4.10.7 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP
OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER
SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT
SUPPORTS=WCS_SERVER SUPPORTS=GEOS SUPPORTS=POINT_Z_M INPUT=EPPL7
INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE

I don't know if this is relevant not having something like OUTPUT=TIFF but
if no GeoTIFF support was included it shoudn't work neither in map mode,
which works, should it?. The compilation was with no errors. This happens
in both, Mapserver 4.10 and Mapserver 5.6.6.

Regards,
Juan Manuel Moreno Rivera.

Sección de Teledetección y SIG / Remote Sensing & GIS group

Instituto de Desarrollo Regional / Institute for Regional Development

Universidad de Castilla-La Mancha / University of Castilla-La Mancha

Tlf: +34 967599200 (Ext: 2623)
http://www.teledeteccionysig.es/
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] Geotiff OUTPUTFORMAT fails in browse mode

2014-02-20 Thread Juanma M. R.
Hi Steve,

First of all, thank you for your answer Steve.

I know it is old-style this way of requesting but I am trying to add
functionallity to a complex software based in this old-styled way of
working. I know that upgrading to the latest version of Mapserver would be
the best, however it implies resources and time that could be not
affordable right now as the existing and working map files would need
upgrade.

That is why I try working like that. I want to offer KMZ download and I was
trying to make a bridge to this format avoiding the upgrade of Mapserver by
updating GDAL, which can be done without having to update mapserver version
used by the system. Using the latest version of gdal_translate will make
affordable to get KMZ file from a GeoTIFF, for example, if I can store it
in the server side, which is what browse mode allows.

I know it sounds a bit complex, but updating the whole system is much more
complex and requires more efforts. Does anyone know why geotiff doesn´t
work in browse mode? Maybe is a limitation of these versions of mapserver,
4.10 and 5.6.6. If so, just knowing it would avoid me a lot of time
searching for it.

Cheers,

Juan Manuel Moreno Rivera.

Sección de Teledetección y SIG / Remote Sensing & GIS group

Instituto de Desarrollo Regional / Institute for Regional Development

Universidad de Castilla-La Mancha / University of Castilla-La Mancha

Tlf: +34 967599200 (Ext: 2623)
http://www.teledeteccionysig.es/


2014-02-19 17:25 GMT+01:00 Lime, Steve D (MNIT) :

>  Browse mode is for old-style interactive clients. That is, user click ->
> send to mapserver -> mapserver builds new page. You wouldn't use
> mode=browse to create georeferenced output like you're doing. Mode=map or
> WMS are the way to go.
>
>
>
> Steve
>
>
>
> *From:* mapserver-users-boun...@lists.osgeo.org [mailto:
> mapserver-users-boun...@lists.osgeo.org] *On Behalf Of *Juanma M. R.
> *Sent:* Wednesday, February 19, 2014 9:24 AM
> *To:* mapserver-users@lists.osgeo.org
> *Subject:* [mapserver-users] Geotiff OUTPUTFORMAT fails in browse mode
>
>
>
> Dear all,
>
>
>
> I am trying to generate a georeferenced image with Mapserver. Now I am
> trying to do it with GeoTIFF.
>
>
>
> The issue is that all the outputformats are working in browse mode but
> GeoTiff. However, if I change to map mode, the URL request works and gives
> back the tiff data in stream to the browser.
>
>
>
> Is there any reason to GeoTIFF not working in browse mode, writting a file
> in the temporal folder from the server?
>
>
>
> My outputformat in .map file:
>
>
>
> OUTPUTFORMAT
>
>   NAME GEOTIFF_16
>
>   DRIVER "GDAL/GTiff"
>
>   MIMETYPE "image/tiff"
>
>   IMAGEMODE RGB
>
>   EXTENSION "tif"
>
> END
>
>
>
> I have checked the compilation of mapserver having the --with-tiff in both
> cases. And it is ok but the
>
>
>
> ./mapserv -v
>
>
>
> returns:
>
>
>
> MapServer version 4.10.7 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP
> OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER
> SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT
> SUPPORTS=WCS_SERVER SUPPORTS=GEOS SUPPORTS=POINT_Z_M INPUT=EPPL7
> INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE
>
>
>
> I don't know if this is relevant not having something like OUTPUT=TIFF but
> if no GeoTIFF support was included it shoudn't work neither in map mode,
> which works, should it?. The compilation was with no errors. This happens
> in both, Mapserver 4.10 and Mapserver 5.6.6.
>
>
>
> Regards,
>
> Juan Manuel Moreno Rivera.
>
> Sección de Teledetección y SIG / Remote Sensing & GIS group
>
> Instituto de Desarrollo Regional / Institute for Regional Development
>
> Universidad de Castilla-La Mancha / University of Castilla-La Mancha
>
> Tlf: +34 967599200 (Ext: 2623)
>
> http://www.teledeteccionysig.es/
>
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

[mapserver-users] Connecting to a mapnik / renderd / mod_tile layer

2014-07-14 Thread Juanma M. R.
Dear list,

I have a server offering OSM tiled layer based on the instructions here
.

I have a openlayers using this OSM base layer and other overlay layers but
I would like to make them printable as an image or PDF. After trying with
client-side alternatives and failing one after another, I am trying now
based on a server-side and MapServer based approach, the one I am more used
to.

So, I have already configured the overlays layers in my map file and I need
to include the OSM tiled layer I have directly from mod_tile data. The
issue is that I can't find a way to do it. I am not familiar with mapnik,
that is why I am trying with mapserv which I installed on the server. Also
I would like to use mapserver to use the PDF, KML and multiple image
formats supported. I have always used mapserver, but I inherit this OSM
configuration and I found problems migrating or addapting it.

I have checked mapserver documentation, but following the instructions
in Rendering
OSM Data  it
fails when trying to compile mapserver-utils due to not being able to
connect www.naturalearthdata.com. However, here
 it says no
osm2pgsql estructure is supported anymore. So I am affraid I will need to
load data again to be able to serve OSM layer from MapServer.

Does anyone know if it is possible to connect to this mod_tile tiles from a
mapserver mapfile?

If no, does anyone know why mapserver-utils are failing and if there is
another tutorial for configuring OSM own server with MapServer?

Regards,
Juan Manuel Moreno Rivera.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] Connecting to a mapnik / renderd / mod_tile layer

2014-07-14 Thread Juanma M. R.
Hi list,

I will answer partially to myself.

I have checked mapserver documentation, but following the instructions
in Rendering
> OSM Data <http://trac.osgeo.org/mapserver/wiki/RenderingOsmDataUbuntu> it
> fails when trying to compile mapserver-utils due to not being able to
> connect www.naturalearthdata.com.


Finally I downloaded the file mannually finding the correct URL:

cd data/
wget 
http://www.naturalearthdata.com/http//www.naturalearthdata.com/download/10m/cultural/ne_10m_admin_0_boundary_lines_land.zip
mv ne_10m_admin_0_boundary_lines_land.zip 10m-admin-0-boundary-lines-land.zip

I get compiling it and get the osm-google.map file containing the styles
for OSM. I copy them to my own mapfile and change the fonts to those I have
in my fonts directory for MapServer. And it worked! This way I sorted out
the problem of serving OSM data with MapServer.

I found another versión of the tutorial for serving OSM with MapServer
<https://github.com/mapserver/mapserver/wiki/Rendering-OSM-data-on-Ubuntu-12.04>
that
I feel is more up to date, but is almost the same content. I would
recommend this one if other people wants to serve OSM with MapServer.

About the issue of using the data from the mod_tile layer with MapServer, I
still need help on it. It would be helpful so that I do not have two
versions of OSM data, one based on osm2pgsql and the other based on impsom.
Also I would be able to avoid following this tutorial. At the end if I
can't find a working option I will replace the tiled OSM based on Mapnik by
this one based on MapServer to avoid duplicating data.

Cheers,
Juan Manuel Moreno Rivera.

2014-07-14 10:58 GMT+02:00 Juanma M. R. :

> Dear list,
>
> I have a server offering OSM tiled layer based on the instructions here
> <http://switch2osm.org/serving-tiles/building-a-tile-server-from-packages/>
> .
>
> I have a openlayers using this OSM base layer and other overlay layers but
> I would like to make them printable as an image or PDF. After trying with
> client-side alternatives and failing one after another, I am trying now
> based on a server-side and MapServer based approach, the one I am more used
> to.
>
> So, I have already configured the overlays layers in my map file and I
> need to include the OSM tiled layer I have directly from mod_tile data. The
> issue is that I can't find a way to do it. I am not familiar with mapnik,
> that is why I am trying with mapserv which I installed on the server. Also
> I would like to use mapserver to use the PDF, KML and multiple image
> formats supported. I have always used mapserver, but I inherit this OSM
> configuration and I found problems migrating or addapting it.
>
> I have checked mapserver documentation, but following the instructions in 
> Rendering
> OSM Data <http://trac.osgeo.org/mapserver/wiki/RenderingOsmDataUbuntu> it
> fails when trying to compile mapserver-utils due to not being able to
> connect www.naturalearthdata.com. However, here
> <http://trac.osgeo.org/mapserver/wiki/RenderingOsmData> it says no
> osm2pgsql estructure is supported anymore. So I am affraid I will need to
> load data again to be able to serve OSM layer from MapServer.
>
> Does anyone know if it is possible to connect to this mod_tile tiles from
> a mapserver mapfile?
>
> If no, does anyone know why mapserver-utils are failing and if there is
> another tutorial for configuring OSM own server with MapServer?
>
> Regards,
> Juan Manuel Moreno Rivera.
>
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

[mapserver-users] Rendering OSM data with MapServer+MapCache

2014-10-07 Thread Juanma M. R.
Dear list,

I have managed to install and configure succesfully a server showing data
from OSM with the MapServer+MapCache convination. I followed these
instructions

and
some hacks that were necessary.

The issue is that I have migrated from a mapnik+mod_tile server because
some requirements that it didn't acomplished but the rendering of the map
with mapnik was the same as the one shown in the OSM server.

I also managed to configure a mapserver (without cache feature) with a .map
file styling OSM but it is neither the one from OSM server.

Does anyone know how to apply this style, the one from OSM server, to this
data being renderd by MapServer? Does anyone done the migration from the
OSM server style to mapfile or XML format for MapServer?

Regards,
Juan Manuel Moreno Rivera.

Sección de Teledetección y SIG / Remote Sensing & GIS group

Instituto de Desarrollo Regional / Institute for Regional Development

Universidad de Castilla-La Mancha / University of Castilla-La Mancha

Tlf: +34 967599200 (Ext: 2623)
http://www.teledeteccionysig.es/
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] RE Rendering OSM data with MapServer+MapCache

2014-10-21 Thread Juanma M. R.
Hi Steve,

Thanks for your link. I will check it right now to see if I could learn
something about how to replicate the drawing styles from OSM servers but
using mapserver. The main problem is that the styles I use show less
information than the ones in OSM servers.

I only use basemaps to configure the mapfiles for OSM, but I don't know how
to do it to generate a mapfile that draws OSM servers styled maps.

Regards,

Juan Manuel Moreno Rivera.

Sección de Teledetección y SIG / Remote Sensing & GIS group

Instituto de Desarrollo Regional / Institute for Regional Development

Universidad de Castilla-La Mancha / University of Castilla-La Mancha

Tlf: +34 967599200 (Ext: 2623)
http://www.teledeteccionysig.es/

2014-10-07 18:23 GMT+02:00 :

> I'm sorry I just saw the link you provided that uses basemap.
> I didn't read it but hopefully you'll find some answers in the link I
> provided
>
>
>
>  *"Juanma M. R."  >@lists.osgeo.org <http://lists.osgeo.org>*
> Envoyé par : mapserver-users-boun...@lists.osgeo.org
>
> 2014-10-07 12:13
>   A
> "mapserver-users@lists.osgeo.org" 
> cc
>   Objet
> [mapserver-users] Rendering OSM data with MapServer+MapCache
>
>
>
>
>
>
> Dear list,
>
> I have managed to install and configure succesfully a server showing data
> from OSM with the MapServer+MapCache convination. I followed these
> *instructions*
> <https://github.com/mapserver/mapserver/wiki/Rendering-OSM-data-on-Ubuntu-12.04>
>  and
> some hacks that were necessary.
>
> The issue is that I have migrated from a mapnik+mod_tile server because
> some requirements that it didn't acomplished but the rendering of the map
> with mapnik was the same as the one shown in the OSM server.
>
> I also managed to configure a mapserver (without cache feature) with a
> .map file styling OSM but it is neither the one from OSM server.
>
> Does anyone know how to apply this style, the one from OSM server, to this
> data being renderd by MapServer? Does anyone done the migration from the
> OSM server style to mapfile or XML format for MapServer?
>
> Regards,
> Juan Manuel Moreno Rivera.
>
> Sección de Teledetección y SIG / Remote Sensing & GIS group
>
> Instituto de Desarrollo Regional / Institute for Regional Development
>
> Universidad de Castilla-La Mancha / University of Castilla-La Mancha
>
> Tlf: +34 967599200 (Ext: 2623)
>
> *http://www.teledeteccionysig.es/* <http://www.teledeteccionysig.es/>
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>
>
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] RE Rendering OSM data with MapServer+MapCache

2014-10-21 Thread Juanma M. R.
Hi again,

I think that the link is based on basemaps but I don't know how to modify
the basemaps generate_style.py and Makefile to change maps drawing. It
seems that there is no documentation for customizing basemaps.

I will go on looking for it and maybe I will have to configure my map
adding part of the information with my own rules in the OSM servers style.
However it is extrange nobody has migrated OSM new style to mapserver
mapfile. It would be a good point for mapserver as OSM data server.

Regards,
Juan Manuel Moreno Rivera.

Sección de Teledetección y SIG / Remote Sensing & GIS group

Instituto de Desarrollo Regional / Institute for Regional Development

Universidad de Castilla-La Mancha / University of Castilla-La Mancha

Tlf: +34 967599200 (Ext: 2623)

http://www.teledeteccionysig.es/

2014-10-21 14:12 GMT+02:00 Juanma M. R. :

> Hi Steve,
>
> Thanks for your link. I will check it right now to see if I could learn
> something about how to replicate the drawing styles from OSM servers but
> using mapserver. The main problem is that the styles I use show less
> information than the ones in OSM servers.
>
> I only use basemaps to configure the mapfiles for OSM, but I don't know
> how to do it to generate a mapfile that draws OSM servers styled maps.
>
> Regards,
>
> Juan Manuel Moreno Rivera.
>
> Sección de Teledetección y SIG / Remote Sensing & GIS group
>
> Instituto de Desarrollo Regional / Institute for Regional Development
>
> Universidad de Castilla-La Mancha / University of Castilla-La Mancha
>
> Tlf: +34 967599200 (Ext: 2623)
> http://www.teledeteccionysig.es/
>
> 2014-10-07 18:23 GMT+02:00 :
>
> I'm sorry I just saw the link you provided that uses basemap.
>> I didn't read it but hopefully you'll find some answers in the link I
>> provided
>>
>>
>>
>>  *"Juanma M. R." > >@lists.osgeo.org <http://lists.osgeo.org>*
>> Envoyé par : mapserver-users-boun...@lists.osgeo.org
>>
>> 2014-10-07 12:13
>>   A
>> "mapserver-users@lists.osgeo.org" 
>> cc
>>   Objet
>> [mapserver-users] Rendering OSM data with MapServer+MapCache
>>
>>
>>
>>
>>
>>
>> Dear list,
>>
>> I have managed to install and configure succesfully a server showing data
>> from OSM with the MapServer+MapCache convination. I followed these
>> *instructions*
>> <https://github.com/mapserver/mapserver/wiki/Rendering-OSM-data-on-Ubuntu-12.04>
>>  and
>> some hacks that were necessary.
>>
>> The issue is that I have migrated from a mapnik+mod_tile server because
>> some requirements that it didn't acomplished but the rendering of the map
>> with mapnik was the same as the one shown in the OSM server.
>>
>> I also managed to configure a mapserver (without cache feature) with a
>> .map file styling OSM but it is neither the one from OSM server.
>>
>> Does anyone know how to apply this style, the one from OSM server, to
>> this data being renderd by MapServer? Does anyone done the migration from
>> the OSM server style to mapfile or XML format for MapServer?
>>
>> Regards,
>> Juan Manuel Moreno Rivera.
>>
>> Sección de Teledetección y SIG / Remote Sensing & GIS group
>>
>> Instituto de Desarrollo Regional / Institute for Regional Development
>>
>> Universidad de Castilla-La Mancha / University of Castilla-La Mancha
>>
>> Tlf: +34 967599200 (Ext: 2623)
>>
>> *http://www.teledeteccionysig.es/* <http://www.teledeteccionysig.es/>
>> ___
>> mapserver-users mailing list
>> mapserver-users@lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>>
>>
>>
>
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

[mapserver-users] Problem in pointObj-> project from php/mapscript

2011-10-04 Thread Juanma M. R.
Hi list,

I have got the following code:

$pointObj=ms_newPointObj();
$pointObj->setXY($x,$y);
$pointObj->project(ms_newProjectionObj("init=".$srsIn),
ms_newProjectionObj("init=".$srsOut));

$xout=$pointObj->x;
$yout=$pointObj->y;


$srsIn is epsg:32612 and $srsOut is epsg:4326. The issue is that the point
modified has the correct value for the Y coordinate already converted in the
X field, and viceversa. So that I get a point with the X and Y coordinates
interchanged.

The input coordinates are:
$x = 642138
$y = 2983678

And the result:
$pointObj->x = -109.5678723348
$pointObj->y = 26.967831676085

I think this is not the expected result. I have checked it with mapscript
from  Mapserver 4.10 and 5.6.3. I have looked for a bug or something similar
that could cause that. Anyone with the same problem?

Cheers,
Juan Manuel Moreno Rivera.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] Re: Problem in pointObj-> project from php/mapscript

2011-10-05 Thread Juanma M. R.
Dear Daniel,

First of all thank you for answering so quickly.

Secondly, I must apologise for sending the email. It was my fault as I
understood wrongly the meaning of the coordinates in degrees. When referring
to them as Longitude and Latitude I misunderstood them. I know the values
they can get but I changed the correct place for Latitude / Longitude in the
x/y pointObj. Just reading your email (using easting and northing instead) I
understood my problem.

The pointObj->project method works perfectly in php/mapscript.

Sorry again for this email and thank you very much for your answer Daniel.

Best regards,
Juan Manuel Moreno Rivera.

On 11-10-04 01:51 PM, Juanma M. R. wrote:
> >
> > The input coordinates are:
> > $x = 642138
> > $y = 2983678
> >
> > And the result:
> > $pointObj->x = -109.5678723348
> > $pointObj->y = 26.967831676085
> >
> > I think this is not the expected result. I have checked it with
> > mapscript from  Mapserver 4.10 and 5.6.3. I have looked for a bug or
> > something similar that could cause that. Anyone with the same problem?
> >
>
> $pointObj->x is the longitude (a.k.a. easting), and $pointObj->y the
> latitude (a.k.a. northing). A value of -109 can only be a longitude,
> since latitude must be in the +/-90 range.
>
> What makes you think that the x and y are reversed?
>
> --
> Daniel Morissette
> http://www.mapgears.com/
> Provider of Professional MapServer Support since 2000
>
>
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] pointObj->project behaviour differences from 4.10 to 5.6 versions

2012-04-12 Thread Juanma M. R.
Dear list,

I have a webgis application working with different CRS all over the world.
I have realized that the behaviour from version 4.10 of the function
pointObj->project differs from the one of version 5.6 from Mapserver. For
example, I try to convert (-116,-15) in 4326 and in mapscript from version
4.10 it returns  (-26158630.407638,-25040425.679281) when passing to 32630.
On the other hand, in version 5.6 of mapscript it returns the original
coordinates without transforming them.

Is this intended or am I doing something wrong? Which is the intended
behaviour of project function in MapServer 5.6?

Best regards,
-- 
Juan Manuel Moreno Rivera.
University of Castilla-La Mancha
Albacete, Spain
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] pointObj->project behaviour differences from 4.10 to 5.6 versions

2012-04-23 Thread Juanma M. R.
Hi,

I have been doing more tests to try to identify exactly the problem and I
ahve realized that, according to http://twcc.free.fr/, the coordinates
returned when working with php_mapscript from version 4.10 are not correct.
I am trying to get where is the problem, so that I can decide wether
sorting out a The issue is that the function project returns different
things depending on the server configuration:

Input coordinates in Google Spherical Mercator:
(-20500513.477395,-3641436.
715144)

Server 1: proj 4.1.5 and MapServer 4.10 returns
(-90270074.105905,-216622133.8792)
Server 2: proj 4.1.7 and MapServer 5.6 returns
(-20500513.477395,-3641436.715144)
The World Coordinate Converter automatically transform the output CRS to
UTM 60S, so I can't not validate the transformation with it.

The issue is that I would like to understand the expected behaviour from
this function, so that I can go on checking it and defining the best way to
support the functionality or detecting a problem in servers configuration.

The code is as follows:

function project($x, $y, $srsIn, $srsOut)
{
$pointObj=ms_newPointObj();

$pointObj->setXY($x,$y);


$pointObj->project(ms_newProjectionObj("init=".strtolower($srsIn)),
ms_newProjectionObj("init=".strtolower($srsOut)));

$xout=$pointObj->x;
$yout=$pointObj->y;

$pointObj->free();

return $xout.",".$yout;
}
?>


2012/4/16 Lime, Steve D (DNR) 

>  The transformation is done in place, I’ve not had problems with it. What
> language? Can you post a code snippet?
>
> ** **
>
> *From:* mapserver-users-boun...@lists.osgeo.org [mailto:
> mapserver-users-boun...@lists.osgeo.org] *On Behalf Of *Juanma M. R.
> *Sent:* Thursday, April 12, 2012 4:13 AM
> *To:* mapserver-users@lists.osgeo.org
> *Subject:* [mapserver-users] pointObj->project behaviour differences from
> 4.10 to 5.6 versions
>
> ** **
>
> Dear list,
>
> I have a webgis application working with different CRS all over the world.
> I have realized that the behaviour from version 4.10 of the function
> pointObj->project differs from the one of version 5.6 from Mapserver. For
> example, I try to convert (-116,-15) in 4326 and in mapscript from version
> 4.10 it returns  (-26158630.407638,-25040425.679281) when passing to 32630.
> On the other hand, in version 5.6 of mapscript it returns the original
> coordinates without transforming them.
>
> Is this intended or am I doing something wrong? Which is the intended
> behaviour of project function in MapServer 5.6?
>
> Best regards,
> --
> Juan Manuel Moreno Rivera.
> University of Castilla-La Mancha
> Albacete, Spain
>



-- 
Juan Manuel Moreno Rivera.
University of Castilla-La Mancha
Albacete, Spain
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] Re: pointObj->project behaviour differences from 4.10 to 5.6 versions

2012-04-24 Thread Juanma M. R.
Dear Daniel,

Thank you for your answer Daniel. I already know that the coordinate I put
was out of bounds for this limit. The issue is that I am trying to find the
best option to manage this change from one global CRS to a local one, as it
is necessary in my application. In version 4.10 it returned values for
local CRS and allowed to go back again to global ones. So it worked.
However, in version 5.6 it doesn't work at all. That is why I tried to
understand the way the function project works in the different versions.

After testing and your feedback, obviously I prefer the behaviour of the
5.6 that at least allows you to detect whenever a coordinate is out of the
bounds without having to check for each CRS bounds. In version 5.6 project
function returns the same coordinates when asking for transforming a
coordinate out of bounds for the output CRS. Checking if the function
returns the same coordinates helps you detecting this case and it is easier
to control it. I don't know if any other user in the list has deal with
this problem and used another way to implement it.

Best regards,


> Message: 1
> Date: Mon, 23 Apr 2012 14:03:20 -0400
> From: Daniel Morissette 
> Subject: Re: [mapserver-users] pointObj->project behaviour differences
>from4.10 to 5.6 versions
> To: mapserver-users@lists.osgeo.org
> Message-ID: <4f959968.3040...@mapgears.com>
> Content-Type: text/plain; charset=windows-1252; format=flowed
>
> EPSG:32630 is UTM Zone 30N ...
>
> http://spatialreference.org/ref/epsg/32630/
>
> A UTM coordinate system is defined for a limited area, a UTM zone has a
> width of 6 degrees of longitude, in this case
>
>   EPSG:32630
>   WGS 84 / UTM zone 30N
>   WGS84 Bounds: -6., 0., 0., 84.
>
> It is very likely that you are getting random values from various PROJ
> versions because your -116, -15 test coordinate is outside of the area
> of validity of the EPSG:32630 coordinate system.
>
> Daniel
>
>
> On 12-04-23 9:39 AM, Juanma M. R. wrote:
> > Hi,
> >
> > I have been doing more tests to try to identify exactly the problem and
> > I ahve realized that, according to http://twcc.free.fr/, the coordinates
> > returned when working with php_mapscript from version 4.10 are not
> > correct. I am trying to get where is the problem, so that I can decide
> > wether sorting out a The issue is that the function project returns
> > different things depending on the server configuration:
> >
> > Input coordinates in Google Spherical Mercator:
> > (-20500513.477395,-3641436.
> > 715144)
> >
> > Server 1: proj 4.1.5 and MapServer 4.10 returns
> > (-90270074.105905,-216622133.8792)
> > Server 2: proj 4.1.7 and MapServer 5.6 returns
> > (-20500513.477395,-3641436.715144)
> > The World Coordinate Converter automatically transform the output CRS to
> > UTM 60S, so I can't not validate the transformation with it.
> >
> > The issue is that I would like to understand the expected behaviour from
> > this function, so that I can go on checking it and defining the best way
> > to support the functionality or detecting a problem in servers
> > configuration.
> >
> > The code is as follows:
> >
> > function project($x, $y, $srsIn, $srsOut)
> >  {
> >  $pointObj=ms_newPointObj();
> >
> >  $pointObj->setXY($x,$y);
> >
> >
> > $pointObj->project(ms_newProjectionObj("init=".strtolower($srsIn)),
> > ms_newProjectionObj("init=".strtolower($srsOut)));
> >
> >  $xout=$pointObj->x;
> >  $yout=$pointObj->y;
> >
> >  $pointObj->free();
> >
> >  return $xout.",".$yout;
> >  }
> > ?>
> >
> >
> > 2012/4/16 Lime, Steve D (DNR)  > <mailto:steve.l...@state.mn.us>>
> >
> > The transformation is done in place, I’ve not had problems with it.
> > What language? Can you post a code snippet?
> >
> > __ __
> >
> > *From:*mapserver-users-boun...@lists.osgeo.org
> > <mailto:mapserver-users-boun...@lists.osgeo.org>
> > [mailto:mapserver-users-boun...@lists.osgeo.org
> > <mailto:mapserver-users-boun...@lists.osgeo.org>] *On Behalf Of
> > *Juanma M. R.
> > *Sent:* Thursday, April 12, 2012 4:13 AM
> > *To:* mapserver-users@lists.osgeo.org
> > <mailto:mapserver-users@lists.osgeo.org>
> > *Subject:* [mapserver-users] pointObj->project behaviour differences
> > from 4.10 to 5.6 versions
> >
&g

[mapserver-users] Using value from hstore column for labels

2015-11-09 Thread Juanma M. R.
Dear list,

I am trying to draw milestones from my OSM local database. The issue is
that in Nominatim database, the one I am ussing, I am trying to draw the
value "name" from a hstore column. How do I indicate this in mapfile in
labelitem? I haven't found the format to use a hstore data.

"name"->'name' obviously breaks the mapfile format.

Regards,
Juan Manuel Moreno Rivera. 
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users