[mapserver-users] center in a map the results of [shpext]

2022-03-28 Thread roman villarreal
Hi list i wish all of you are ok

i hope some body can help me, im working with a mapserver templete to display 
the results of a ITEMQUERY in a map , in that query i get the searched object 
extents in the [shpext] variable (482125.35 2152693.00 482125.35 
2152693.00) (point)

How can i center in the template map the data of [shpext]? , because now, the 
results displays with the mapfile extents and the results not always are on the 
center of the map

im using a very old versions because is an old proyect (ms4w: 3.0.6, ms: 6.0.3, 
pmapper: 4.3.2)

thaks for all of your help

regards

Román
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Cannot read shp file from database

2022-03-28 Thread Scott

I think the srid should be 900913 and actually it should probably be 3857.


On 3/28/22 11:59, Jeremy JK wrote:

Thanks!


On Mon, Mar 28, 2022 at 2:52 PM Seth G > wrote:


__
Hi,

The following 3 lines should all be in your LAYER...END block (and
replacing the current DATA line):

   CONNECTIONTYPE postgis
   CONNECTION "user=postgres password=StrongAdminP@ssw0rd
dbname=news_test_shp host=127.0.0.1 port=5432"
   DATA "geom from sample.admintable using unique gid using
srid=9000913"


Seth
--
web:https://geographika.net 
twitter: @geographika


On Mon, Mar 28, 2022, at 8:29 PM, Jeremy JK wrote:

Hello all,
On my virtualbox linuxmint machine I can view a shp file with
MapServer when the shp file is on filesystem.
When I put it into the database, the browser returns an error message
but ogrinfo program can read the database well.
See below

And thanks for your assistance
J

*Error*: msLoadMap(): Unknown identifier. Parsing error near
(CONNECTIONTYPE):(line 9)
*Petition*:

http://localhost:8080/cgi-bin/mapserv?map=/opt/mapfile/mapserver_quickstart.map=WMS=Getmap=1.1.1=Countries=EPSG:4326=-137,29,-53,88=PNG=800=600




*ogrinfo *PG:"host=127.0.0.1 user=postgres
password=StrongAdminP@ssw0rd dbname=news_test_shp port=5432"
sample.admintable -summary
INFO: Open of `PG:host=127.0.0.1 user=postgres
password=StrongAdminP@ssw0rd dbname=news_test_shp port=5432'
      using driver `PostgreSQL' successful.

Layer name: sample.admintable
Geometry: Multi Polygon
Feature Count: 258
Extent: (-180.00, -90.00) - (180.00, 83.634101)
Layer SRS WKT:
GEOGCRS["WGS 84",
    DATUM["World Geodetic System 1984",
        ELLIPSOID["WGS 84",6378137,298.257223563,
            LENGTHUNIT["metre",1]]],
    PRIMEM["Greenwich",0,
        ANGLEUNIT["degree",0.0174532925199433]],
    CS[ellipsoidal,2],
        AXIS["geodetic latitude (Lat)",north,
            ORDER[1],
            ANGLEUNIT["degree",0.0174532925199433]],
        AXIS["geodetic longitude (Lon)",east,
            ORDER[2],
            ANGLEUNIT["degree",0.0174532925199433]],
    ID["EPSG",4326]]
Data axis to CRS axis mapping: 2,1
...

+++
*MAP*
  NAME "MAPSERVER_QUICKSTART"
  EXTENT -137 29 -53 88
  UNITS DD
  SHAPEPATH "/opt/mapfile"
  SIZE 800 600

  IMAGETYPE PNG24
  CONNECTIONTYPE postgis
  CONNECTION "user=postgres password=StrongAdminP@ssw0rd
dbname=news_test_shp host=127.0.0.1 port=5432"
  DATA "geom from sample.admintable using unique gid using
srid=9000913"


  PROJECTION
    "init=epsg:4326"
  END

  WEB
    METADATA
      ows_title "MapServer Quickstart"
      ows_enable_request "*"
      ows_srs "EPSG:4326 EPSG:25832 EPSG:25833"
    END
  END

  LAYER
    NAME "Countries"
    STATUS ON
    TYPE POLYGON
    DATA "ne_10m_admin_0_countries"
    CLASS
      STYLE
        COLOR 246 241 223
        OUTLINECOLOR 0 0 0
      END
    END
  END

END

++
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org

https://lists.osgeo.org/mailman/listinfo/mapserver-users





___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Cannot read shp file from database

2022-03-28 Thread Seth G
Hi,

The following 3 lines should all be in your LAYER...END block (and replacing 
the current DATA line):

  CONNECTIONTYPE postgis 
  CONNECTION "user=postgres password=StrongAdminP@ssw0rd dbname=news_test_shp 
host=127.0.0.1 port=5432"
  DATA "geom from sample.admintable using unique gid using srid=9000913"


Seth
--
web:https://geographika.net
twitter: @geographika


On Mon, Mar 28, 2022, at 8:29 PM, Jeremy JK wrote:
> Hello all,
> On my virtualbox linuxmint machine I can view a shp file with MapServer when 
> the shp file is on filesystem.
> When I put it into the database, the browser returns an error message
> but ogrinfo program can read the database well.
> See below 
> 
> And thanks for your assistance 
> J
> 
> *Error*: msLoadMap(): Unknown identifier. Parsing error near 
> (CONNECTIONTYPE):(line 9)
> *Petition*: 
> http://localhost:8080/cgi-bin/mapserv?map=/opt/mapfile/mapserver_quickstart.map=WMS=Getmap=1.1.1=Countries=EPSG:4326=-137,29,-53,88=PNG=800=600
> 
> 
> *ogrinfo *PG:"host=127.0.0.1 user=postgres password=StrongAdminP@ssw0rd 
> dbname=news_test_shp port=5432" sample.admintable -summary
> INFO: Open of `PG:host=127.0.0.1 user=postgres password=StrongAdminP@ssw0rd 
> dbname=news_test_shp port=5432'
>   using driver `PostgreSQL' successful.
> 
> Layer name: sample.admintable
> Geometry: Multi Polygon
> Feature Count: 258
> Extent: (-180.00, -90.00) - (180.00, 83.634101)
> Layer SRS WKT:
> GEOGCRS["WGS 84",
> DATUM["World Geodetic System 1984",
> ELLIPSOID["WGS 84",6378137,298.257223563,
> LENGTHUNIT["metre",1]]],
> PRIMEM["Greenwich",0,
> ANGLEUNIT["degree",0.0174532925199433]],
> CS[ellipsoidal,2],
> AXIS["geodetic latitude (Lat)",north,
> ORDER[1],
> ANGLEUNIT["degree",0.0174532925199433]],
> AXIS["geodetic longitude (Lon)",east,
> ORDER[2],
> ANGLEUNIT["degree",0.0174532925199433]],
> ID["EPSG",4326]]
> Data axis to CRS axis mapping: 2,1
> ...
> 
> +++
> *MAP*
>   NAME "MAPSERVER_QUICKSTART"
>   EXTENT -137 29 -53 88
>   UNITS DD
>   SHAPEPATH "/opt/mapfile"
>   SIZE 800 600
>   
>   IMAGETYPE PNG24
>   CONNECTIONTYPE postgis 
>   CONNECTION "user=postgres password=StrongAdminP@ssw0rd dbname=news_test_shp 
> host=127.0.0.1 port=5432"
>   DATA "geom from sample.admintable using unique gid using srid=9000913"
> 
> 
>   PROJECTION
> "init=epsg:4326"
>   END
> 
>   WEB
> METADATA
>   ows_title "MapServer Quickstart"
>   ows_enable_request "*"
>   ows_srs "EPSG:4326 EPSG:25832 EPSG:25833"
> END
>   END
> 
>   LAYER
> NAME "Countries"
> STATUS ON
> TYPE POLYGON
> DATA "ne_10m_admin_0_countries"
> CLASS
>   STYLE
> COLOR 246 241 223
> OUTLINECOLOR 0 0 0
>   END
> END
>   END
> 
> END
> ++
> ___
> MapServer-users mailing list
> MapServer-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
> 
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Cannot read shp file from database

2022-03-28 Thread Jeremy JK
Thanks!


On Mon, Mar 28, 2022 at 2:52 PM Seth G  wrote:

> Hi,
>
> The following 3 lines should all be in your LAYER...END block (and
> replacing the current DATA line):
>
>   CONNECTIONTYPE postgis
>   CONNECTION "user=postgres password=StrongAdminP@ssw0rd
> dbname=news_test_shp host=127.0.0.1 port=5432"
>   DATA "geom from sample.admintable using unique gid using srid=9000913"
>
>
> Seth
> --
> web:https://geographika.net
> twitter: @geographika
>
>
> On Mon, Mar 28, 2022, at 8:29 PM, Jeremy JK wrote:
>
> Hello all,
> On my virtualbox linuxmint machine I can view a shp file with MapServer
> when the shp file is on filesystem.
> When I put it into the database, the browser returns an error message
> but ogrinfo program can read the database well.
> See below
>
> And thanks for your assistance
> J
>
> *Error*: msLoadMap(): Unknown identifier. Parsing error near
> (CONNECTIONTYPE):(line 9)
> *Petition*:
> http://localhost:8080/cgi-bin/mapserv?map=/opt/mapfile/mapserver_quickstart.map=WMS=Getmap=1.1.1=Countries=EPSG:4326=-137,29,-53,88=PNG=800=600
>
>
> *ogrinfo *PG:"host=127.0.0.1 user=postgres password=StrongAdminP@ssw0rd
> dbname=news_test_shp port=5432" sample.admintable -summary
> INFO: Open of `PG:host=127.0.0.1 user=postgres password=StrongAdminP@ssw0rd
> dbname=news_test_shp port=5432'
>   using driver `PostgreSQL' successful.
>
> Layer name: sample.admintable
> Geometry: Multi Polygon
> Feature Count: 258
> Extent: (-180.00, -90.00) - (180.00, 83.634101)
> Layer SRS WKT:
> GEOGCRS["WGS 84",
> DATUM["World Geodetic System 1984",
> ELLIPSOID["WGS 84",6378137,298.257223563,
> LENGTHUNIT["metre",1]]],
> PRIMEM["Greenwich",0,
> ANGLEUNIT["degree",0.0174532925199433]],
> CS[ellipsoidal,2],
> AXIS["geodetic latitude (Lat)",north,
> ORDER[1],
> ANGLEUNIT["degree",0.0174532925199433]],
> AXIS["geodetic longitude (Lon)",east,
> ORDER[2],
> ANGLEUNIT["degree",0.0174532925199433]],
> ID["EPSG",4326]]
> Data axis to CRS axis mapping: 2,1
> ...
>
> +++
> *MAP*
>   NAME "MAPSERVER_QUICKSTART"
>   EXTENT -137 29 -53 88
>   UNITS DD
>   SHAPEPATH "/opt/mapfile"
>   SIZE 800 600
>
>   IMAGETYPE PNG24
>   CONNECTIONTYPE postgis
>   CONNECTION "user=postgres password=StrongAdminP@ssw0rd
> dbname=news_test_shp host=127.0.0.1 port=5432"
>   DATA "geom from sample.admintable using unique gid using srid=9000913"
>
>
>   PROJECTION
> "init=epsg:4326"
>   END
>
>   WEB
> METADATA
>   ows_title "MapServer Quickstart"
>   ows_enable_request "*"
>   ows_srs "EPSG:4326 EPSG:25832 EPSG:25833"
> END
>   END
>
>   LAYER
> NAME "Countries"
> STATUS ON
> TYPE POLYGON
> DATA "ne_10m_admin_0_countries"
> CLASS
>   STYLE
> COLOR 246 241 223
> OUTLINECOLOR 0 0 0
>   END
> END
>   END
>
> END
>
> ++
> ___
> MapServer-users mailing list
> MapServer-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>
>
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] Cannot read shp file from database

2022-03-28 Thread Jeremy JK
Hello all,
On my virtualbox linuxmint machine I can view a shp file with MapServer
when the shp file is on filesystem.
When I put it into the database, the browser returns an error message
but ogrinfo program can read the database well.
See below

And thanks for your assistance
J

*Error*: msLoadMap(): Unknown identifier. Parsing error near
(CONNECTIONTYPE):(line 9)
*Petition*:
http://localhost:8080/cgi-bin/mapserv?map=/opt/mapfile/mapserver_quickstart.map=WMS=Getmap=1.1.1=Countries=EPSG:4326=-137,29,-53,88=PNG=800=600


*ogrinfo *PG:"host=127.0.0.1 user=postgres password=StrongAdminP@ssw0rd
dbname=news_test_shp port=5432" sample.admintable -summary
INFO: Open of `PG:host=127.0.0.1 user=postgres password=StrongAdminP@ssw0rd
dbname=news_test_shp port=5432'
  using driver `PostgreSQL' successful.

Layer name: sample.admintable
Geometry: Multi Polygon
Feature Count: 258
Extent: (-180.00, -90.00) - (180.00, 83.634101)
Layer SRS WKT:
GEOGCRS["WGS 84",
DATUM["World Geodetic System 1984",
ELLIPSOID["WGS 84",6378137,298.257223563,
LENGTHUNIT["metre",1]]],
PRIMEM["Greenwich",0,
ANGLEUNIT["degree",0.0174532925199433]],
CS[ellipsoidal,2],
AXIS["geodetic latitude (Lat)",north,
ORDER[1],
ANGLEUNIT["degree",0.0174532925199433]],
AXIS["geodetic longitude (Lon)",east,
ORDER[2],
ANGLEUNIT["degree",0.0174532925199433]],
ID["EPSG",4326]]
Data axis to CRS axis mapping: 2,1
...

+++
*MAP*
  NAME "MAPSERVER_QUICKSTART"
  EXTENT -137 29 -53 88
  UNITS DD
  SHAPEPATH "/opt/mapfile"
  SIZE 800 600

  IMAGETYPE PNG24
  CONNECTIONTYPE postgis
  CONNECTION "user=postgres password=StrongAdminP@ssw0rd
dbname=news_test_shp host=127.0.0.1 port=5432"
  DATA "geom from sample.admintable using unique gid using srid=9000913"


  PROJECTION
"init=epsg:4326"
  END

  WEB
METADATA
  ows_title "MapServer Quickstart"
  ows_enable_request "*"
  ows_srs "EPSG:4326 EPSG:25832 EPSG:25833"
END
  END

  LAYER
NAME "Countries"
STATUS ON
TYPE POLYGON
DATA "ne_10m_admin_0_countries"
CLASS
  STYLE
COLOR 246 241 223
OUTLINECOLOR 0 0 0
  END
END
  END

END
++
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] Release of MapCache 1.12.1

2022-03-28 Thread jbo-ads

The MapServer team is pleased to announce the patch release of MapCache 1.12.1.


This fixes an issue affecting only non-fully opaque gdal sources (see PR #282 
 for details).



You can download the source code at
.

The list of evolutions is found on the Changelog page at


Many thanks to everyone how contributed to fix the issue.

--
The MapServer team




___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users