Re: [mapserver-users] still have problem when add postgis layer on mapserver mapfile

2012-08-26 Thread Rahkonen Jukka
Hi,

- This may be a typo:
NAME "places1"
 DATA "geometry from osm_new_mainroads using unique osm_id using srid 3785"
 TYPE POINT
Or do you really have your places are in osm_new_mainroads table.

- Then it is a good habit to have PROJECTION block in both the MAP block and 
for each LAYER.
- It is also a good habit to use DEBUG 5 and see what you get into the block
- shp2img is better for testing than a browser but mode=map is OK too. Remember 
to set layers to default (as you had) or give layer names with &layers= 
parameter
- Finally, I think it would be good to add STYLE into your layer, inside CLASS.

See the "Very basic WMS Server mapfile" example at the bottom of page 
http://mapserver.org/ogc/wms_server.html
It should be OK. Perhaps it could be even a bit more simple because now it has 
a reference to a symbolset file. A very, very basic mapfile should be made to 
work without external symbols.

-Jukka Rahkonen-



 李杨 [gisyangli] wrote:

> I try to load a postgis data layer on my mapfile, have problem when configure 
> the mapfile done, then visit it using 
> "http://127.0.0.1/cgi-bin/mapserv?&map=/var/www/osm-google.map&mode=map&mode=map";
>  on the browser address. , only a blank blue image return, with no expected 
> dot info.

> I can not figure out which step is have problem.

> Provide background info:

ogrinfo for the database  table:

jack@jack-Vostro-1450:/usr/lib/cgi-bin$ ogrinfo PG:"host=127.0.0.1 user=osm  
password=osm dbname=osm port=5432" osm_new_mainroads -summary
INFO: Open of `PG:host=127.0.0.1 user=osm  password=osm dbname=osm port=5432'
  using driver `PostgreSQL' successful.

Layer name: osm_new_mainroads
Geometry: Line String
Feature Count: 9704
Extent: (-9871463.421196, 3533052.471384) - (-9460289.228784, 4190971.740014)
Layer SRS WKT:
PROJCS["Popular Visualisation CRS / Mercator (deprecated)",
GEOGCS["Popular Visualisation CRS",
DATUM["Popular_Visualisation_Datum",
SPHEROID["Popular Visualisation Sphere",6378137,0,
AUTHORITY["EPSG","7059"]],
TOWGS84[0,0,0,0,0,0,0],
AUTHORITY["EPSG","6055"]],
PRIMEM["Greenwich",0,
AUTHORITY["EPSG","8901"]],
UNIT["degree",0.01745329251994328,
AUTHORITY["EPSG","9122"]],
AUTHORITY["EPSG","4055"]],
UNIT["metre",1,
AUTHORITY["EPSG","9001"]],
PROJECTION["Mercator_1SP"],
PARAMETER["central_meridian",0],
PARAMETER["scale_factor",1],
PARAMETER["false_easting",0],
PARAMETER["false_northing",0],
AUTHORITY["EPSG","3785"],
AXIS["X",EAST],
AXIS["Y",NORTH]]
FID Column = id
Geometry Column = geometry
osm_id: Integer (0.0)
name: String (255.0)
type: String (255.0)
tunnel: Integer (5.0)
bridge: Integer (5.0)
oneway: Integer (5.0)
ref: String (255.0)
z_order: Integer (5.0)
jack@jack-Vostro-1450:/usr/lib/cgi-bin$


.map(uing in the link above : osg-google.map) info for configure:

MAP
NAME places1
STATUS ON
SIZE 800 800
EXTENT -9871463.421196 3533052.471384 -9460289.228784 4190971.740014
UNITS meters
IMAGECOLOR 153 179 204


WEB
IMAGEPATH "/var/www/output"
IMAGEURL "/output/"
END

LAYER
 STATUS DEFAULT
 NAME "places1"
 DATA "geometry from osm_new_mainroads using unique osm_id using srid 3785"
 TYPE POINT
 CONNECTIONTYPE postgis
 CONNECTION "host=localhost dbname=osm user=osm password=osm port=5432"
 CLASS
NAME "places1_color"
COLOR 255 215 0
  END
END

END

-
for a explanation , whenever set  "DATA "geometry from osm_new_mainroads using 
unique osm_id using srid 3785"",
DATA "geometry from osm_new_mainroads", or
DATA "geometry from osm_new_mainroads using unique osm_id using srid 3875

is the same , a blank image return
---
massperv version info:

./mapserv -v
MapServer version 6.0.3 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ 
SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=WMS_SERVER 
SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=GEOS 
INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE



I try to experiment it in two different laptop and can not get expected result.

Please those with experience help me., this problem qurrall  me a lot this 
weeked.

Thanks a lot.


--
Yang Li
GIS Developer
P.R.China


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


Re: [mapserver-users] still have problem when add postgis layer on mapserver mapfile

2012-08-26 Thread pcreso


I assume the getcapabilities request is working OK?

What happens when you open this in your browser:
http://127.0.0.1/cgi-bin/mapserv?&map=/var/www/osm-google.map?service=WMS&version=1.3.0&request=getcapabilities

& what happens if you initialise the CRS in the mapfile with just the epsg code 
instead of the full WKT?

I assume you are looking to do something like this?
http://121.73.69.119/osm_nz.html


Cheers,

   Brent Wood

--- On Mon, 8/27/12, Henrique Rennó  wrote:

From: Henrique Rennó 
Subject: Re: [mapserver-users] still have problem when add postgis layer on 
mapserver mapfile
To: "李杨" 
Cc: mapserver-...@lists.osgeo.org, mapserver-users@lists.osgeo.org
Date: Monday, August 27, 2012, 4:56 AM

It seems your url is set wrong as mode is given twice. You have to pass 
layer=layer_name
2012/8/26 李杨 

I try to load a postgis data layer on my mapfile, have problem when configure 
the mapfile done, then visit it using 
"http://127.0.0.1/cgi-bin/mapserv?&map=/var/www/osm-google.map&mode=map&mode=map";
 on the browser address. , only a blank blue image return, with no expected dot 
info.



I can not figure out which step is have problem.

Provide background info:

ogrinfo for the database  table:

jack@jack-Vostro-1450:/usr/lib/cgi-bin$ ogrinfo PG:"host=127.0.0.1 user=osm  
password=osm dbname=osm port=5432" osm_new_mainroads -summary


INFO: Open of `PG:host=127.0.0.1 user=osm  password=osm dbname=osm port=5432'
  using driver `PostgreSQL' successful.

Layer name: osm_new_mainroads
Geometry: Line String
Feature Count: 9704


Extent: (-9871463.421196, 3533052.471384) - (-9460289.228784, 4190971.740014)
Layer SRS WKT:
PROJCS["Popular Visualisation CRS / Mercator (deprecated)",
    GEOGCS["Popular Visualisation CRS",


    DATUM["Popular_Visualisation_Datum",
    SPHEROID["Popular Visualisation Sphere",6378137,0,
    AUTHORITY["EPSG","7059"]],
    TOWGS84[0,0,0,0,0,0,0],


    AUTHORITY["EPSG","6055"]],
    PRIMEM["Greenwich",0,
    AUTHORITY["EPSG","8901"]],
    UNIT["degree",0.01745329251994328,


    AUTHORITY["EPSG","9122"]],
    AUTHORITY["EPSG","4055"]],
    UNIT["metre",1,
    AUTHORITY["EPSG","9001"]],
    PROJECTION["Mercator_1SP"],


    PARAMETER["central_meridian",0],
    PARAMETER["scale_factor",1],
    PARAMETER["false_easting",0],
    PARAMETER["false_northing",0],
    AUTHORITY["EPSG","3785"],


    AXIS["X",EAST],
    AXIS["Y",NORTH]]
FID Column = id
Geometry Column = geometry
osm_id: Integer (0.0)
name: String (255.0)
type: String (255.0)
tunnel: Integer (5.0)
bridge: Integer (5.0)


oneway: Integer (5.0)
ref: String (255.0)
z_order: Integer (5.0)
jack@jack-Vostro-1450:/usr/lib/cgi-bin$ 


.map(uing in the link above : osg-google.map) info for configure:



MAP
NAME places1
STATUS ON
SIZE 800 800
EXTENT -9871463.421196 3533052.471384 -9460289.228784 4190971.740014
UNITS meters
IMAGECOLOR 153 179 204


WEB
    IMAGEPATH "/var/www/output"


    IMAGEURL "/output/"
END

LAYER
 STATUS DEFAULT
 NAME "places1"
 DATA "geometry from osm_new_mainroads using unique osm_id using srid 3785"
 TYPE POINT
 CONNECTIONTYPE postgis


 CONNECTION "host=localhost dbname=osm user=osm password=osm port=5432"
 CLASS
NAME "places1_color"
COLOR 255 215 0
  END
END

END

-
for a explanation , whenever set  "DATA "geometry from osm_new_mainroads using 
unique osm_id using srid 3785"",


DATA "geometry from osm_new_mainroads", or 
DATA "geometry from osm_new_mainroads using unique osm_id using srid 3875

is the same , a blank image return
---


massperv version info:

./mapserv -v
MapServer version 6.0.3 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ 
SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=WMS_SERVER 
SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=GEOS 
INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE





I try to experiment it in two different laptop and can not get expected result.

Please those with experience help me., this problem qurrall  me a lot this 
weeked.

Thanks a lot. 



-- 

Yang LiGIS DeveloperP.R.China



___

mapserver-users mailing list

mapserver-users@lists.osgeo.org

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





-- 
Henrique




-Inline Attachment Follows-

___
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] still have problem when add postgis layer on mapserver mapfile

2012-08-26 Thread Henrique Rennó
It seems your url is set wrong as mode is given twice. You have to pass
layer=layer_name

2012/8/26 李杨 

> I try to load a postgis data layer on my mapfile, have problem when
> configure the mapfile done, then visit it using "
> http://127.0.0.1/cgi-bin/mapserv?&map=/var/www/osm-google.map&mode=map&mode=map";
> on the browser address. , only a blank blue image return, with no expected
> dot info.
>
> I can not figure out which step is have problem.
>
> Provide background info:
>
> ogrinfo for the database  table:
>
> jack@jack-Vostro-1450:/usr/lib/cgi-bin$ ogrinfo PG:"host=127.0.0.1
> user=osm  password=osm dbname=osm port=5432" osm_new_mainroads -summary
> INFO: Open of `PG:host=127.0.0.1 user=osm  password=osm dbname=osm
> port=5432'
>   using driver `PostgreSQL' successful.
>
> Layer name: osm_new_mainroads
> Geometry: Line String
> Feature Count: 9704
> Extent: (-9871463.421196, 3533052.471384) - (-9460289.228784,
> 4190971.740014)
> Layer SRS WKT:
> PROJCS["Popular Visualisation CRS / Mercator (deprecated)",
> GEOGCS["Popular Visualisation CRS",
> DATUM["Popular_Visualisation_Datum",
> SPHEROID["Popular Visualisation Sphere",6378137,0,
> AUTHORITY["EPSG","7059"]],
> TOWGS84[0,0,0,0,0,0,0],
> AUTHORITY["EPSG","6055"]],
> PRIMEM["Greenwich",0,
> AUTHORITY["EPSG","8901"]],
> UNIT["degree",0.01745329251994328,
> AUTHORITY["EPSG","9122"]],
> AUTHORITY["EPSG","4055"]],
> UNIT["metre",1,
> AUTHORITY["EPSG","9001"]],
> PROJECTION["Mercator_1SP"],
> PARAMETER["central_meridian",0],
> PARAMETER["scale_factor",1],
> PARAMETER["false_easting",0],
> PARAMETER["false_northing",0],
> AUTHORITY["EPSG","3785"],
> AXIS["X",EAST],
> AXIS["Y",NORTH]]
> FID Column = id
> Geometry Column = geometry
> osm_id: Integer (0.0)
> name: String (255.0)
> type: String (255.0)
> tunnel: Integer (5.0)
> bridge: Integer (5.0)
> oneway: Integer (5.0)
> ref: String (255.0)
> z_order: Integer (5.0)
> jack@jack-Vostro-1450:/usr/lib/cgi-bin$
>
>
> 
> .map(uing in the link above : osg-google.map) info for configure:
>
> MAP
> NAME places1
> STATUS ON
> SIZE 800 800
> EXTENT -9871463.421196 3533052.471384 -9460289.228784 4190971.740014
> UNITS meters
> IMAGECOLOR 153 179 204
>
>
> WEB
> IMAGEPATH "/var/www/output"
> IMAGEURL "/output/"
> END
>
> LAYER
>  STATUS DEFAULT
>  NAME "places1"
>  DATA "geometry from osm_new_mainroads using unique osm_id using srid 3785"
>  TYPE POINT
>  CONNECTIONTYPE postgis
>  CONNECTION "host=localhost dbname=osm user=osm password=osm port=5432"
>  CLASS
> NAME "places1_color"
> COLOR 255 215 0
>   END
> END
>
> END
>
> -
> for a explanation , whenever set  "DATA "geometry from osm_new_mainroads
> using unique osm_id using srid 3785"",
> DATA "geometry from osm_new_mainroads", or
> DATA "geometry from osm_new_mainroads using unique osm_id using srid 3875
>
> is the same , a blank image return
> ---
> massperv version info:
>
> ./mapserv -v
> MapServer version 6.0.3 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ
> SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=WMS_SERVER
> SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=GEOS
> INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE
>
>
>
> I try to experiment it in two different laptop and can not get expected
> result.
>
> Please those with experience help me., this problem qurrall  me a lot this
> weeked.
>
> Thanks a lot.
>
>
> --
> Yang Li
> GIS Developer
> P.R.China
>
>
>
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>


-- 
Henrique
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] still have problem when add postgis layer on mapserver mapfile

2012-08-26 Thread Havard Tveite

In later versions of Mapserver, you seem to need to use a symbol.
For example:

  SYMBOL
NAME "circle"
TYPE ellipse
POINTS
  1 1
END
  END


  LAYER
  ...
CLASS
NAME "places1_color"
  STYLE
SYMBOL 'circle'
COLOR 255 215 0
SIZE 1
  END # style
END # class
  END # layer

I guess the documentation needs to be updated.

Håvard

On 08/26/2012 07:57 AM, 李杨 wrote:

I try to load a postgis data layer on my mapfile, have problem when
configure the mapfile done, then visit it using
"http://127.0.0.1/cgi-bin/mapserv?&map=/var/www/osm-google.map&mode=map&mode=map";
on the browser address. , only a blank blue image return, with no
expected dot info.

I can not figure out which step is have problem.

Provide background info:

ogrinfo for the database  table:

jack@jack-Vostro-1450:/usr/lib/cgi-bin$ ogrinfo PG:"host=127.0.0.1
user=osm  password=osm dbname=osm port=5432" osm_new_mainroads -summary
INFO: Open of `PG:host=127.0.0.1 user=osm  password=osm dbname=osm
port=5432'
   using driver `PostgreSQL' successful.

Layer name: osm_new_mainroads
Geometry: Line String
Feature Count: 9704
Extent: (-9871463.421196, 3533052.471384) - (-9460289.228784,
4190971.740014)
Layer SRS WKT:
PROJCS["Popular Visualisation CRS / Mercator (deprecated)",
 GEOGCS["Popular Visualisation CRS",
 DATUM["Popular_Visualisation_Datum",
 SPHEROID["Popular Visualisation Sphere",6378137,0,
 AUTHORITY["EPSG","7059"]],
 TOWGS84[0,0,0,0,0,0,0],
 AUTHORITY["EPSG","6055"]],
 PRIMEM["Greenwich",0,
 AUTHORITY["EPSG","8901"]],
 UNIT["degree",0.01745329251994328,
 AUTHORITY["EPSG","9122"]],
 AUTHORITY["EPSG","4055"]],
 UNIT["metre",1,
 AUTHORITY["EPSG","9001"]],
 PROJECTION["Mercator_1SP"],
 PARAMETER["central_meridian",0],
 PARAMETER["scale_factor",1],
 PARAMETER["false_easting",0],
 PARAMETER["false_northing",0],
 AUTHORITY["EPSG","3785"],
 AXIS["X",EAST],
 AXIS["Y",NORTH]]
FID Column = id
Geometry Column = geometry
osm_id: Integer (0.0)
name: String (255.0)
type: String (255.0)
tunnel: Integer (5.0)
bridge: Integer (5.0)
oneway: Integer (5.0)
ref: String (255.0)
z_order: Integer (5.0)
jack@jack-Vostro-1450:/usr/lib/cgi-bin$


.map(uing in the link above : osg-google.map) info for configure:

MAP
NAME places1
STATUS ON
SIZE 800 800
EXTENT -9871463.421196 3533052.471384 -9460289.228784 4190971.740014
UNITS meters
IMAGECOLOR 153 179 204


WEB
 IMAGEPATH "/var/www/output"
 IMAGEURL "/output/"
END

LAYER
  STATUS DEFAULT
  NAME "places1"
  DATA "geometry from osm_new_mainroads using unique osm_id using srid 3785"
  TYPE POINT
  CONNECTIONTYPE postgis
  CONNECTION "host=localhost dbname=osm user=osm password=osm port=5432"
  CLASS
NAME "places1_color"
COLOR 255 215 0
   END
END

END

-
for a explanation , whenever set  "DATA "geometry from osm_new_mainroads
using unique osm_id using srid 3785"",
DATA "geometry from osm_new_mainroads", or
DATA "geometry from osm_new_mainroads using unique osm_id using srid 3875

is the same , a blank image return
---
massperv version info:

./mapserv -v
MapServer version 6.0.3 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ
SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=WMS_SERVER
SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT
SUPPORTS=GEOS INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE



I try to experiment it in two different laptop and can not get expected
result.

Please those with experience help me., this problem qurrall  me a lot
this weeked.

Thanks a lot.


--
Yang Li
GIS Developer
P.R.China




___
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] still have problem when add postgis layer on mapserver mapfile

2012-08-25 Thread 李杨
I try to load a postgis data layer on my mapfile, have problem when
configure the mapfile done, then visit it using "
http://127.0.0.1/cgi-bin/mapserv?&map=/var/www/osm-google.map&mode=map&mode=map";
on the browser address. , only a blank blue image return, with no expected
dot info.

I can not figure out which step is have problem.

Provide background info:

ogrinfo for the database  table:

jack@jack-Vostro-1450:/usr/lib/cgi-bin$ ogrinfo PG:"host=127.0.0.1
user=osm  password=osm dbname=osm port=5432" osm_new_mainroads -summary
INFO: Open of `PG:host=127.0.0.1 user=osm  password=osm dbname=osm
port=5432'
  using driver `PostgreSQL' successful.

Layer name: osm_new_mainroads
Geometry: Line String
Feature Count: 9704
Extent: (-9871463.421196, 3533052.471384) - (-9460289.228784,
4190971.740014)
Layer SRS WKT:
PROJCS["Popular Visualisation CRS / Mercator (deprecated)",
GEOGCS["Popular Visualisation CRS",
DATUM["Popular_Visualisation_Datum",
SPHEROID["Popular Visualisation Sphere",6378137,0,
AUTHORITY["EPSG","7059"]],
TOWGS84[0,0,0,0,0,0,0],
AUTHORITY["EPSG","6055"]],
PRIMEM["Greenwich",0,
AUTHORITY["EPSG","8901"]],
UNIT["degree",0.01745329251994328,
AUTHORITY["EPSG","9122"]],
AUTHORITY["EPSG","4055"]],
UNIT["metre",1,
AUTHORITY["EPSG","9001"]],
PROJECTION["Mercator_1SP"],
PARAMETER["central_meridian",0],
PARAMETER["scale_factor",1],
PARAMETER["false_easting",0],
PARAMETER["false_northing",0],
AUTHORITY["EPSG","3785"],
AXIS["X",EAST],
AXIS["Y",NORTH]]
FID Column = id
Geometry Column = geometry
osm_id: Integer (0.0)
name: String (255.0)
type: String (255.0)
tunnel: Integer (5.0)
bridge: Integer (5.0)
oneway: Integer (5.0)
ref: String (255.0)
z_order: Integer (5.0)
jack@jack-Vostro-1450:/usr/lib/cgi-bin$


.map(uing in the link above : osg-google.map) info for configure:

MAP
NAME places1
STATUS ON
SIZE 800 800
EXTENT -9871463.421196 3533052.471384 -9460289.228784 4190971.740014
UNITS meters
IMAGECOLOR 153 179 204


WEB
IMAGEPATH "/var/www/output"
IMAGEURL "/output/"
END

LAYER
 STATUS DEFAULT
 NAME "places1"
 DATA "geometry from osm_new_mainroads using unique osm_id using srid 3785"
 TYPE POINT
 CONNECTIONTYPE postgis
 CONNECTION "host=localhost dbname=osm user=osm password=osm port=5432"
 CLASS
NAME "places1_color"
COLOR 255 215 0
  END
END

END

-
for a explanation , whenever set  "DATA "geometry from osm_new_mainroads
using unique osm_id using srid 3785"",
DATA "geometry from osm_new_mainroads", or
DATA "geometry from osm_new_mainroads using unique osm_id using srid 3875

is the same , a blank image return
---
massperv version info:

./mapserv -v
MapServer version 6.0.3 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ
SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=WMS_SERVER
SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=GEOS
INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE



I try to experiment it in two different laptop and can not get expected
result.

Please those with experience help me., this problem qurrall  me a lot this
weeked.

Thanks a lot.


-- 
Yang Li
GIS Developer
P.R.China
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users