Re: [mapserver-users] SIZEUNITS set to meters

2014-06-25 Thread Håvard Tveite

I have not tested this for sizeunits meters, but for pixels
you need to set style MAXWIDTH (or MAXSIZE).

Håvard

On 2014-06-24 17:02, Kalbermatten Michaël wrote:

Hi list,

I'm trying to render a road given a certain width in meters.

To achieve that, I did use SIZEUNITS METERS in the LAYER definition.

I'm using this layer via WMS in QGIS. At small scales (1:10'000), this is 
working great, the roads is well-sized regarding its real width, but as soon as 
I zoom in and have a larger scale then approximately 1:5'000, then this is not 
working anymore and the line width stays constant the more I zoom in.

I'm using MapServer 6.0.3. I did partially copy the mapfile content hereunder.

I think that I tried almost every possible parameter combination (like using 
MINSIZE, MAXSIZE, MINWIDTH, and so on), but nothing seems to work…

Did anyone ever encounter that issue ? Am I doing sometime wrong ?

Best regards

Michael

MAP

 NAME "… "

 DEFRESOLUTION 96

 EXTENT 40 10 80 30

 IMAGETYPE "png"

 MAXSIZE 5120

RESOLUTION 96

 STATUS ON

 TRANSPARENT TRUE

 UNITS METERS

LAYER

 NAME "…."

 TYPE LINE

 METADATA

 "wms_srs" "EPSG:21781"

 "wms_title"   "…."

 END

 STATUS ON

 CONNECTIONTYPE POSTGIS

 CONNECTION "…."

 PROCESSING "CLOSE_CONNECTION=DEFER"

 DATA "geom from …. using unique idobj using srid=21781"

 TEMPLATE "foo"

 PROJECTION

 "init=epsg:21781"

 END

 CLASSITEM "objektart"

 SIZEUNITS METERS

 UNITS METERS

 SYMBOLSCALEDENOM 1000

 CLASS

 NAME "Road"

 EXPRESSION "Road"

 STYLE

 COLOR 255 0 0

 WIDTH 40

 END

 END

 END

END



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



--
Håvard Tveite
Department of Mathematical Sciences and Technology, NMBU
Drøbakveien 31, POBox 5003, N-1432 Ås, NORWAY
Phone: +47 64965483 Fax: +47 64965401 http://www.nmbu.no/imt/
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Valid extents for shape file, World Wind WMS Client

2014-06-25 Thread jonathanknez
Steve,

*Your suggestions worked.* I am now able to use my MapServer to serve a
shapefile to my World Wind client. 

1. I changed the projection in my map file to 900913. 

Initially I got a new error that, "msProcessProjection(): no options found
in ‘init’ file". I checked my epsg file in /usr/share/proj/epsg. It did not
contain a definition for 900913. I found a definition online. I added it to
the end of my epsg file and it cleared up the error.
<900913> +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0
+y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs

2. Updated my wms_onlineresource field to replace that incorrect trailing ?
with a &.

Once those changes were made, it worked. 

I have one follow on question, *how did you know that epsg:900913 should be
used from looking at the shapefile?* Is there a dictionary somewhere that
says Google Mercator=900913?

Here is my corrected map file per Steve's direction. Thank you for the help.

= houston.map 
MAP
NAME houston
STATUS ON
SIZE 800 600
EXTENT -10720217.00 3306038.00 -10419354.00 3606902.00
UNITS METERS

SHAPEPATH "shapefiles/houston"
IMAGETYPE PNG24
PROJECTION
"init=epsg:900913"
END
 
WEB
METADATA
wms_title "Houston Title Web"
wms_enable_request "*"
wms_onlineresource
"http://10.0.0.141/cgi-bin/mapserver?map=/var/www/html/houston.map&";
wms_srs "epsg:900913 epsg:4326"
END
END
 
LAYER
NAME "Houston_Border"
DATA houston
STATUS ON
TYPE POLYGON
CLASS
STYLE
COLOR 246 241 223
OUTLINECOLOR 0 0 0
END
END
METADATA
wms_title "Houston Title Layer"
wms_extent "-10720217.00 3306038.00 
-10419354.00
3606902.00"
END
PROJECTION
"init=epsg:900913"
END
END
END



--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/Valid-extents-for-shape-file-World-Wind-WMS-Client-tp5147433p5147873.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

[mapserver-users] MapCache inverted Y values

2014-06-25 Thread Travis Kirstine
I just configured mapcache using a grid using 512 512 size.  Everything
seems OK however when I view the resultant tilesets in the demo map viewer
they have a inverted Y value, the latitudes are negative values when they
should be positive.  Do I need to create a custom cache to handle tile
sizes other that 256?


   
  -20037508.3427892480 -20037508.3427892480 20037508.3427892480
20037508.3427892480
  EPSG:3857
  EPSG:900913
  m
  512 512
  156543.0339280410 78271.51696402048 39135.75848201023
19567.87924100512 9783.939620502561 4891.969810251280 2445.984905125640
1222.992452562820 611.4962262814100 305.7481131407048 152.8740565703525
76.43702828517624 38.21851414258813 19.10925707129406 9.554628535647032
4.777314267823516 2.388657133911758 1.194328566955879 0.5971642834779395
0.29858214173896975 0.149291070869484875 0.0746455354347424375
   


   
  /opt/mapcache/512_cache
  10
  
   



  
default_wms
disk
gmaps_512
mixed
2 2
10
  

  

image/png
default
true


http://wmts2.firstbasesolutions.com/cgi-bin/mapserver_wms_fcgi
  






-- 

*Travis Kirstine*
*First Base Solutions I**nc*.
tkirst...@firstbasesolutions.com

140 Renfrew Dr. | Suite 100 | Markham, ON | L3R 6B3
p. 905-477-3600 ext. 301 | m. 647-534-4798
http://www.firstbasesolutions.com
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] Map data strategy

2014-06-25 Thread Brent Fraser

Paul,

  Have a read regarding TILEINDEXes 
(http://mapserver.org/optimization/tileindex.html).  It may be useful to 
have one TILEINDEX (and one layer) per scale group (so a total of 6 
layers).  The TILEINDEX will provide a spatial limitation [min/max x/y] 
per file.


Best Regards,
Brent Fraser

On 6/24/2014 11:36 PM, Malm Paul wrote:


Hi,

I've just started using Mapserver and have a question, that could help 
me to cut corners.


1)I have a lot of S57 charts in different scale groups 1-6.

2)It should be simple to maintain the map data (a lot of upgrades).

3)Of course, it should be fast.

Strategy of today:

I have the original data stored in the original format on ram disk. I 
have one map file that INCLUDEs all "layer" files (one per chart).


The layer files defines the all the interesting chart features 
(layers) and the max scale.


I was thinking that I only shall use max scale, not min scale, because 
if I don't have a chart with a larger scale a certain position when I 
zoom in, then I shall at least see a chart. Even if has a to small 
scale for this zoom. I don't have any spatial restrictions on each 
layer or layer file, just for the map file -90, -180, 90, 180 (i.e no 
limits)


Is it possible to have spatial limitations on a layer?

When I use this strategy the map server chokes then I zoom in too much.

I can see that the map configuration could be done in a lot of 
different ways,


How would your strategy be?

Kind regards,

Paul



___
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] Valid extents for shape file, World Wind WMS Client

2014-06-25 Thread Lime, Steve D (MNIT)
There was a .prj file in the zip archive you downloaded. That gives you the 
projection...

Steve

-Original Message-
From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of jonathanknez
Sent: Wednesday, June 25, 2014 8:05 AM
To: mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] Valid extents for shape file, World Wind WMS 
Client

Steve,

*Your suggestions worked.* I am now able to use my MapServer to serve a 
shapefile to my World Wind client. 

1. I changed the projection in my map file to 900913. 

Initially I got a new error that, "msProcessProjection(): no options found in 
‘init’ file". I checked my epsg file in /usr/share/proj/epsg. It did not 
contain a definition for 900913. I found a definition online. I added it to the 
end of my epsg file and it cleared up the error.
<900913> +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0
+y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs

2. Updated my wms_onlineresource field to replace that incorrect trailing ?
with a &.

Once those changes were made, it worked. 

I have one follow on question, *how did you know that epsg:900913 should be 
used from looking at the shapefile?* Is there a dictionary somewhere that says 
Google Mercator=900913?

Here is my corrected map file per Steve's direction. Thank you for the help.

= houston.map  MAP
NAME houston
STATUS ON
SIZE 800 600
EXTENT -10720217.00 3306038.00 -10419354.00 3606902.00
UNITS METERS

SHAPEPATH "shapefiles/houston"
IMAGETYPE PNG24
PROJECTION
"init=epsg:900913"
END
 
WEB
METADATA
wms_title "Houston Title Web"
wms_enable_request "*"
wms_onlineresource
"http://10.0.0.141/cgi-bin/mapserver?map=/var/www/html/houston.map&";
wms_srs "epsg:900913 epsg:4326"
END
END
 
LAYER
NAME "Houston_Border"
DATA houston
STATUS ON
TYPE POLYGON
CLASS
STYLE
COLOR 246 241 223
OUTLINECOLOR 0 0 0
END
END
METADATA
wms_title "Houston Title Layer"
wms_extent "-10720217.00 3306038.00 
-10419354.00 3606902.00"
END
PROJECTION
"init=epsg:900913"
END
END
END



--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/Valid-extents-for-shape-file-World-Wind-WMS-Client-tp5147433p5147873.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
___
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] Valid extents for shape file, World Wind WMS Client

2014-06-25 Thread Daniel Morissette

On 14-06-25 10:00 AM, Lime, Steve D (MNIT) wrote:

There was a .prj file in the zip archive you downloaded. That gives you the 
projection...



... and to interpret the contents of the PRJ file then 
http://spatialreference.org/ may be of some use.


--
Daniel Morissette
T: +1 418-696-5056 #201
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] PDF output and file naming (.pdf)

2014-06-25 Thread Basques, Bob (CI-StPaul)
All,

I got the PDF output to work, but the outputted file ends up being output as 
.map.

I'm using CGI (streaming result?) with map.imagetype=pdf, the result is indeed 
a PDF, but with a .map file name.

I tried setting  EXTENTION "pdf" and MIMETYPE "application/x-pdf" inside of 
FORMATOPTION to no effect as far as the file name tag.  Do I maybe need to 
output temporarily to a server location (WEB) for subsequent download?

Thanks

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

Re: [mapserver-users] PDF output and file naming (.pdf)

2014-06-25 Thread Donald Kerr
This is what I use (with some notes):

 

  # PDF

  # Required to change MIMETYPE for outputting PDFs as application/x-pdf

  OUTPUTFORMAT

NAME "pdf"

DRIVER "CAIRO/PDF"

# MIMETYPE "application/x-pdf" # Original

MIMETYPE "application/pdf" #MIME type of "application/pdf" for
pdfs as "application/x-pdf" not always recognised as pdf by browser

IMAGEMODE "RGBA"

EXTENSION "PDF"

TRANSPARENT ON # Requires RGBA, not RGB otherwise errors. Also
requires OFFSITE 255 255 255 in LAYER

  END

 

 

 

From: mapserver-users-boun...@lists.osgeo.org
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Basques, Bob
(CI-StPaul)
Sent: 25 June 2014 15:12
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] PDF output and file naming (.pdf)

 

All,

I got the PDF output to work, but the outputted file ends up being output as
.map.

I'm using CGI (streaming result?) with map.imagetype=pdf, the result is
indeed a PDF, but with a .map file name.

I tried setting  EXTENTION "pdf" and MIMETYPE "application/x-pdf" inside of
FORMATOPTION to no effect as far as the file name tag.  Do I maybe need to
output temporarily to a server location (WEB) for subsequent download?

Thanks

bobb 

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

Re: [mapserver-users] PostGIS Connection Failure

2014-06-25 Thread Humberto Cereser Ibanez
Hi Krishna,

On Tue, 2014-06-24 at 09:35 -0400, Krishna Priya Patury wrote:
> Just wanted to add, when I do a service iptables status, it is says
> Firewall is not running. 
> 
> 
> On Tue, Jun 24, 2014 at 9:30 AM, Krishna Priya Patury
>  wrote:
> Hi All,
>  
> Any other ideas?
>  
> The map server application installed outside of my Centos VM
> can connect to the Postgres database on the VM. I can also
> connect to the database both from within and outside the VM
> using psql.
>  
> I believe the Mapserver installation on my VM is fine too as
> my shp2img and running the mapserver through command line work
> just fine. The issue is only when I try to connect to the
> database through the application from my VM.
> I do not see anything additional in the logs. 

I think that the requisition from your application is not achieving your
VM.
Is the request sent by your application pass through a proxy that blocks
the 5432 port or there is a bridge over which the requests flow
directly?
 
> I can see that the database logs are not updated when I hit it
> though the application within the VM, understandably so with
> the error message in the browser.
>  
> The only difference between running shp2img and the
> application is perhaps the user? I was able to open a
> succesful connection through psql as an 'apache' user as
> well(User which is running the Apache server). So am not sure
> what is missing. 
>  
> Thanks,
> Krishna.
>  
Best regards,

Humberto Cereser Ibanez
> 
> 
> On Mon, Jun 23, 2014 at 5:24 PM, Krishna
>  wrote:
> Yes I can connect to Postgres using the same
> connection information through psql both from within
> and outside my vm.
> 
> Sent from my iPhone
> 
> > On Jun 23, 2014, at 5:20 PM, Paul Ramsey
>  wrote:
> >
> > Did you restart your postgresql after making the
> changes to pg_hba and postgresql.conf? Can you telnet
> to port 5432? Can you connect with psql? Just ignore
> mapserver for now, you have a connection issue.
> >
> > P.
> >
> >
> > --
> > http://postgis.net
> > http://cleverelephant.ca
> >
> >
> > On June 23, 2014 at 2:17:19 PM, Krishna
> (krishna.pat...@gmail.com) wrote:
> >>> As I mentioned I have disabled the firewall. Or so
> I think. When
> >> I login as 'root' and click firewall it says
> disabled. Any way
> >> I can confirm/ test this?
> >
> 
> 
> 
> 
> 
> ___
> 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] PostGIS Connection Failure

2014-06-25 Thread Krishna Priya Patury
Thanks for responding. Would you please tell me how to check that? When I
go to Network Proxy on the VM, "Direct Connection to internet" is selected.


Both Mapserver and Postgres on the same VM. Do you think something might
still be blocking the port? I am able to open a psql connection just fine
using the same port. What is even more confusing is a Mapserver application
outside the VM is able to connect to the Database on the VM just fine.


On Wed, Jun 25, 2014 at 10:18 AM, Humberto Cereser Ibanez <
humbe...@pastoraldacrianca.org.br> wrote:

> Hi Krishna,
>
> On Tue, 2014-06-24 at 09:35 -0400, Krishna Priya Patury wrote:
> > Just wanted to add, when I do a service iptables status, it is says
> > Firewall is not running.
> >
> >
> > On Tue, Jun 24, 2014 at 9:30 AM, Krishna Priya Patury
> >  wrote:
> > Hi All,
> >
> > Any other ideas?
> >
> > The map server application installed outside of my Centos VM
> > can connect to the Postgres database on the VM. I can also
> > connect to the database both from within and outside the VM
> > using psql.
> >
> > I believe the Mapserver installation on my VM is fine too as
> > my shp2img and running the mapserver through command line work
> > just fine. The issue is only when I try to connect to the
> > database through the application from my VM.
> > I do not see anything additional in the logs.
>
> I think that the requisition from your application is not achieving your
> VM.
> Is the request sent by your application pass through a proxy that blocks
> the 5432 port or there is a bridge over which the requests flow
> directly?
>
> > I can see that the database logs are not updated when I hit it
> > though the application within the VM, understandably so with
> > the error message in the browser.
> >
> > The only difference between running shp2img and the
> > application is perhaps the user? I was able to open a
> > succesful connection through psql as an 'apache' user as
> > well(User which is running the Apache server). So am not sure
> > what is missing.
> >
> > Thanks,
> > Krishna.
> >
> Best regards,
>
> Humberto Cereser Ibanez
> >
> >
> > On Mon, Jun 23, 2014 at 5:24 PM, Krishna
> >  wrote:
> > Yes I can connect to Postgres using the same
> > connection information through psql both from within
> > and outside my vm.
> >
> > Sent from my iPhone
> >
> > > On Jun 23, 2014, at 5:20 PM, Paul Ramsey
> >  wrote:
> > >
> > > Did you restart your postgresql after making the
> > changes to pg_hba and postgresql.conf? Can you telnet
> > to port 5432? Can you connect with psql? Just ignore
> > mapserver for now, you have a connection issue.
> > >
> > > P.
> > >
> > >
> > > --
> > > http://postgis.net
> > > http://cleverelephant.ca
> > >
> > >
> > > On June 23, 2014 at 2:17:19 PM, Krishna
> > (krishna.pat...@gmail.com) wrote:
> > >>> As I mentioned I have disabled the firewall. Or so
> > I think. When
> > >> I login as 'root' and click firewall it says
> > disabled. Any way
> > >> I can confirm/ test this?
> > >
> >
> >
> >
> >
> >
> > ___
> > 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 mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] PDF output and file naming (.pdf)

2014-06-25 Thread Lime, Steve D (MNIT)
Try adding:

  FORMATOPTION 'ATTACHMENT=my.pdf'

This should set the appropriate http header element.

Steve

From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Donald Kerr
Sent: Wednesday, June 25, 2014 9:16 AM
To: Basques, Bob (CI-StPaul); mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] PDF output and file naming (.pdf)

This is what I use (with some notes):

  # PDF
  # Required to change MIMETYPE for outputting PDFs as application/x-pdf
  OUTPUTFORMAT
NAME "pdf"
DRIVER "CAIRO/PDF"
# MIMETYPE "application/x-pdf" # Original
MIMETYPE "application/pdf" #MIME type of "application/pdf" for pdfs 
as "application/x-pdf" not always recognised as pdf by browser
IMAGEMODE "RGBA"
EXTENSION "PDF"
TRANSPARENT ON # Requires RGBA, not RGB otherwise errors. Also 
requires OFFSITE 255 255 255 in LAYER
  END



From: 
mapserver-users-boun...@lists.osgeo.org
 [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Basques, Bob 
(CI-StPaul)
Sent: 25 June 2014 15:12
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] PDF output and file naming (.pdf)

All,

I got the PDF output to work, but the outputted file ends up being output as 
.map.

I'm using CGI (streaming result?) with map.imagetype=pdf, the result is indeed 
a PDF, but with a .map file name.

I tried setting  EXTENTION "pdf" and MIMETYPE "application/x-pdf" inside of 
FORMATOPTION to no effect as far as the file name tag.  Do I maybe need to 
output temporarily to a server location (WEB) for subsequent download?

Thanks

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

Re: [mapserver-users] PDF output and file naming (.pdf)

2014-06-25 Thread Basques, Bob (CI-StPaul)
All,

Ok, this worked (Thanks Donald):

   OUTPUTFORMAT
NAME pdf
#MIMETYPE "application/x-pdf"
MIMETYPE "application/pdf"
DRIVER "CAIRO/PDF"
IMAGEMODE RGBA
EXTENSION "PDF"
TRANSPARENT ON
END


On 6/25/14 10:22 AM, Lime, Steve D (MNIT) wrote:
Try adding:

  FORMATOPTION 'ATTACHMENT=my.pdf'
This is a new one, I didn't see that anywhere in the docs.

I don't suppose I can pass a fname=my.pdf param value in through the CGI call 
for the naming, or can I?

One other thing, is there a way to force a VECTOR  pdf output vs Raster.  Using 
the above I seem to be getting a Raster output.

Thanks (some more)

bobb



This should set the appropriate http header element.

Steve

From: 
mapserver-users-boun...@lists.osgeo.org
 [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Donald Kerr
Sent: Wednesday, June 25, 2014 9:16 AM
To: Basques, Bob (CI-StPaul); 
mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] PDF output and file naming (.pdf)

This is what I use (with some notes):

  # PDF
  # Required to change MIMETYPE for outputting PDFs as application/x-pdf
  OUTPUTFORMAT
NAME "pdf"
DRIVER "CAIRO/PDF"
# MIMETYPE "application/x-pdf" # Original
MIMETYPE "application/pdf" #MIME type of "application/pdf" for pdfs 
as "application/x-pdf" not always recognised as pdf by browser
IMAGEMODE "RGBA"
EXTENSION "PDF"
TRANSPARENT ON # Requires RGBA, not RGB otherwise errors. Also 
requires OFFSITE 255 255 255 in LAYER
  END



From: 
mapserver-users-boun...@lists.osgeo.org
 [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Basques, Bob 
(CI-StPaul)
Sent: 25 June 2014 15:12
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] PDF output and file naming (.pdf)

All,

I got the PDF output to work, but the outputted file ends up being output as 
.map.

I'm using CGI (streaming result?) with map.imagetype=pdf, the result is indeed 
a PDF, but with a .map file name.

I tried setting  EXTENTION "pdf" and MIMETYPE "application/x-pdf" inside of 
FORMATOPTION to no effect as far as the file name tag.  Do I maybe need to 
output temporarily to a server location (WEB) for subsequent download?

Thanks

bobb


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

Re: [mapserver-users] PostGIS Connection Failure

2014-06-25 Thread Humberto Cereser Ibanez
Hi Krishna,

On Wed, 2014-06-25 at 11:13 -0400, Krishna Priya Patury wrote:
> Thanks for responding. Would you please tell me how to check that?
> When I go to Network Proxy on the VM, "Direct Connection to internet"
> is selected.

I do not know the particularities of your Centos box (I use Debian), but
I'm hearing some issues about selinux that affect connections on this
O.S.

> 
> 
> Both Mapserver and Postgres on the same VM. Do you think something
> might still be blocking the port? I am able to open a psql connection
> just fine using the same port. What is even more confusing is a
> Mapserver application outside the VM is able to connect to the
> Database on the VM just fine. 

In this case, appears that do not have a blockage of the 5432 port on
your network.

But, probably there are more issues than the user difference that you
mentioned, when the connection is established by the psql or by the
application at localhost.
I suggest you to check:
1) The result of "netstat -a | grep postgres" command
2) The parameter listen_addresses from postgresql configuration file
3) The selinux' configuration

Best regards,

Humberto Cereser Ibanez
> 
> 
> 
> On Wed, Jun 25, 2014 at 10:18 AM, Humberto Cereser Ibanez
>  wrote:
> Hi Krishna,
> 
> On Tue, 2014-06-24 at 09:35 -0400, Krishna Priya Patury wrote:
> > Just wanted to add, when I do a service iptables status, it
> is says
> > Firewall is not running.
> >
> >
> > On Tue, Jun 24, 2014 at 9:30 AM, Krishna Priya Patury
> >  wrote:
> > Hi All,
> >
> > Any other ideas?
> >
> > The map server application installed outside of my
> Centos VM
> > can connect to the Postgres database on the VM. I
> can also
> > connect to the database both from within and outside
> the VM
> > using psql.
> >
> > I believe the Mapserver installation on my VM is
> fine too as
> > my shp2img and running the mapserver through command
> line work
> > just fine. The issue is only when I try to connect
> to the
> > database through the application from my VM.
> > I do not see anything additional in the logs.
> 
> 
> I think that the requisition from your application is not
> achieving your
> VM.
> Is the request sent by your application pass through a proxy
> that blocks
> the 5432 port or there is a bridge over which the requests
> flow
> directly?
> 
> > I can see that the database logs are not updated
> when I hit it
> > though the application within the VM, understandably
> so with
> > the error message in the browser.
> >
> > The only difference between running shp2img and the
> > application is perhaps the user? I was able to open
> a
> > succesful connection through psql as an 'apache'
> user as
> > well(User which is running the Apache server). So am
> not sure
> > what is missing.
> >
> > Thanks,
> > Krishna.
> >
> 
> Best regards,
> 
> Humberto Cereser Ibanez
> >
> >
> > On Mon, Jun 23, 2014 at 5:24 PM, Krishna
> >  wrote:
> > Yes I can connect to Postgres using the same
> > connection information through psql both
> from within
> > and outside my vm.
> >
> > Sent from my iPhone
> >
> > > On Jun 23, 2014, at 5:20 PM, Paul Ramsey
> >  wrote:
> > >
> > > Did you restart your postgresql after
> making the
> > changes to pg_hba and postgresql.conf? Can
> you telnet
> > to port 5432? Can you connect with psql?
> Just ignore
> > mapserver for now, you have a connection
> issue.
> > >
> > > P.
> > >
> > >
> > > --
> > > http://postgis.net
> > > http://cleverelephant.ca
> > >
> > >
> > > On June 23, 2014 at 2:17:19 PM, Krishna
> > (krishna.pat...@gmail.com) wrote:
> > >>> As I mentioned I have disabled the
> firewall. Or so
> > I think. When
> >  

[mapserver-users] Σχετ: htdocs settings and mapfile status

2014-06-25 Thread Stefanos Anastasiou
Hi Bobb,
thanks for the answers. Regarding the html templates: I thought that html files 
are kept in htdocs since this is the DocumentRoot from where apache is 
configured to read files from.  So if I don't need to keep files in htdcos 
where else can I put them and how can apache understand where they are put.

Regarding the On / default status: is this chunk put in the template or the 
mapfile? 

Stefanos


Στις 5:38 μ.μ. Τρίτη, 24 Ιουνίου 2014, ο/η Stefanos Anastasiou 
 έγραψε:
 


Hi list.  I have two questions that are confusing me a little bit.
First of all I am keeping all my HTML template files /usr/local/apache2/htdocs. 
 This folder has read-only permission settings by default so every time I want 
to edit/create a template I use nano or pico through terminal with root 
privileges. So, would it be wise (would it be secure?) to make htdocs folder 
have read/write permission and if not what other way is there so I can 
edit/make template files easily? 

Another question is that when I make my mapfile and set STATUS to default 
everything works fine. But when it's set to on I get a blank page (needless to 
mention about STATUS off). That's not normal right?
___
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] Σχετ: htdocs settings and mapfile status

2014-06-25 Thread Basques, Bob (CI-StPaul)


From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Stefanos 
Anastasiou
Sent: Wednesday, June 25, 2014 2:04 PM
To: Stefanos Anastasiou; mapserver-users@lists.osgeo.org
Subject: [mapserver-users] Σχετ: htdocs settings and mapfile status

Hi Bobb,
thanks for the answers. Regarding the html templates: I thought that html files 
are kept in htdocs since this is the DocumentRoot from where apache is 
configured to read files from.  So if I don't need to keep files in htdcos 
where else can I put them and how can apache understand where they are put.
[] The mapfiles need to be in the APACHE service path someplace, but the HTML 
templates do not, they are read by the Mapfiles .  You specify their location 
inside of the Mapfile.   I usually put them right next to the MAPFILES, but 
they can be hidden to apache by permissions, or even put somewhere else 
entirely.


Regarding the On / default status: is this chunk put in the template or the 
mapfile?
[] Mapfile

Stefanos

Στις 5:38 μ.μ. Τρίτη, 24 Ιουνίου 2014, ο/η Stefanos Anastasiou 
mailto:emperor_s...@yahoo.gr>> έγραψε:

Hi list.  I have two questions that are confusing me a little bit.
First of all I am keeping all my HTML template files /usr/local/apache2/htdocs. 
 This folder has read-only permission settings by default so every time I want 
to edit/create a template I use nano or pico through terminal with root 
privileges. So, would it be wise (would it be secure?) to make htdocs folder 
have read/write permission and if not what other way is there so I can 
edit/make template files easily?

Another question is that when I make my mapfile and set STATUS to default 
everything works fine. But when it's set to on I get a blank page (needless to 
mention about STATUS off). That's not normal right?

___
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] Map data strategy

2014-06-25 Thread Paul Ramsey
If you're using a map file with 100s of layers, you really must set an
EXTENT on each layer to mapserver can intelligently ignore layers that
are not "in scope" for the current view.

P

On Tue, Jun 24, 2014 at 10:36 PM, Malm Paul  wrote:
> Hi,
>
> I’ve just started using Mapserver and have a question, that could help me to
> cut corners.
>
>
>
> 1)  I have a lot of S57 charts in different scale groups 1-6.
>
> 2)  It should be simple to maintain the map data (a lot of upgrades).
>
> 3)  Of course, it should be fast.
>
>
>
> Strategy of today:
>
> I have the original data stored in the original format on ram disk. I have
> one map file that INCLUDEs all “layer” files (one per chart).
>
> The layer files defines the all the interesting chart features (layers) and
> the max scale.
>
> I was thinking that I only shall use max scale, not min scale, because if I
> don’t have a chart with a larger scale a certain position when I zoom in,
> then I shall at least see a chart. Even if has a to small scale for this
> zoom. I don’t have any spatial restrictions on each layer or layer file,
> just for the map file -90, -180, 90, 180 (i.e no limits)
>
> Is it possible to have spatial limitations on a layer?
>
>
>
> When I use this strategy the map server chokes then I zoom in too much.
>
>
>
> I can see that the map configuration could be done in a lot of different
> ways,
>
> How would your strategy be?
>
>
>
> Kind regards,
>
> Paul
>
>
>
>
> ___
> 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