Dietmar Stolz | 27 Jun 15:35 2014
Picon

KML output with blank point bitmaps

Dear list,

my kml output basically works.
Everything works fine with line and polygon type, I get correct kml files.
Point layers works also but mapserver generated blank png's.

The bitmap exist in the right directory with the right size.
The url path in the kml file is right.
I can see the kml point layer in the gis, the points have tooltips and 
are clickable.
The bitmaps have 24 bpp.
Pixmap or vector layer symbols makes no difference.

Debug 5 shows no error and no kml specific information.

MapServer version 6.4.1 on windows 7 64 bit

Any ideas?

Thank you
_______________________________________________
mapserver-users mailing list
mapserver-users <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Stefanos Anastasiou | 27 Jun 15:29 2014
Picon

Permission settings on htdcos

Hello list..!

I'm just trying to load a simple shapefile in the browser. Both mapfile and template are located in /home/mapdata. When I try to browse:  127.0.0.1/cgi-bin/mapserv?map=/home/mapdata/2.map&mode=browse I get the error that says:  "msSaveImage(): Unable to access file. Failed to create output file".

I presume that it has to do with the permission settings in tmp folder in htdcocs. As far as I know it's not a good idea giving permission 666 or 777 to htdocs.  So should I handle this ? 
_______________________________________________
mapserver-users mailing list
mapserver-users <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
Oliver Christen | 27 Jun 09:27 2014

symbol rotation follow map rotation ?

dear list

Observed using mapserver 6.0.1, I have noticed that symbol rotation 
doesn't seem to follow map rotation, ie. the symbols keep the same 
absolute angle whatever the map angle is.
I have the feeling this is a current limitation of Mapserver, as it 
doesn't know if the symbol angle is an absolute value (independent of 
the map angle) or relative (map angle should be added to symbol angle).

example here:

no map rotation (signs symbols with angle aligning them with the streets):
http://map-preprod.morges.ch/preprod/wsgi/mapserv_proxy?BBOX=527784.2%2C151341.33%2C527831.44%2C151402.27&HEIGHT=2438&WIDTH=1890&map_resolution=254&TRANSPARENT=true&VERSION=1.1.1&FORMAT=image%2Fpng&SERVICE=WMS&format_options=dpi%3A254&LAYERS=vd_cad_tpr_cs_s_coul_grl%2Cvd_cad_tpr_baths_s_coul_grl%2Cvd_cad_tpr_odl_l_coul_grl%2Cmf_cad_no_lieudit_label_coul%2Cmf_cad_ab_nom_localisation_label_coul_grl%2Cpri_25_a%2Cgeb_25_a%2Ceis_25_l_modif%2Cstr_25_l%2Coft_tpr_swissnames%2Cmf_sig_signal_physique&REQUEST=GetMap&STYLES=&SRS=EPSG%3A21781

with map rotation (signs symbols have kept their initial angle and are 
not aligned
anymore):
http://map-preprod.morges.ch/preprod/wsgi/mapserv_proxy?BBOX=527784.2%2C151341.33%2C527831.44%2C151402.27&HEIGHT=2438&WIDTH=1890&map_resolution=254&TRANSPARENT=true&VERSION=1.1.1&FORMAT=image%2Fpng&SERVICE=WMS&map_angle=59.99999999999999&format_options=dpi%3A254&LAYERS=vd_cad_tpr_cs_s_coul_grl%2Cvd_cad_tpr_baths_s_coul_grl%2Cvd_cad_tpr_odl_l_coul_grl%2Cmf_cad_no_lieudit_label_coul%2Cmf_cad_ab_nom_localisation_label_coul_grl%2Cpri_25_a%2Cgeb_25_a%2Ceis_25_l_modif%2Cstr_25_l%2Coft_tpr_swissnames%2Cmf_sig_signal_physique&REQUEST=GetMap&STYLES=&angle=59.99999999999999&SRS=EPSG%3A21781 

could someone confirm or infirm?

In my opinion I would prefer a relative angle calculation by default, 
but that's just me :)

thanks for reading
kind regards
Oliver

--

-- 
Camptocamp SA
Oliver Christen
PSE A, EPFL
CH-1015 Lausanne

www.camptocamp.com

+41 21 619 10 23 (direct)
+41 21 619 10 10 (centrale)
+41 21 619 10 00 (fax)

_______________________________________________
mapserver-users mailing list
mapserver-users <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Carlos Ruiz | 26 Jun 17:24 2014
Picon

Re: color attribute question

To achieve more flexibility as you want, you have to code a function with PL/pgSQL in PostgreSQL or with
PHP/Python/Java/C# with Mapscript to define which is the base color (red, green, blue, yellow ...) and
then to calculate the percent in the right RGB channel.

Cheers

Mtro. Carlos Ruiz

--------------------------------------------
On Mon, 6/23/14, Do Wi <dowi84 <at> gmail.com> wrote:

 Subject: Re: [mapserver-users] color attribute question
 To: "Carlos Ruiz" <boolean10001 <at> yahoo.com>
 Date: Monday, June 23, 2014, 2:56 PM

 thanks allot!
 Steve and another user here mentioned this path
 and it did work!only problem is that it cannot be
 changed later if for example the user chooses a blue
 gradient.

 how will i go about doing it with
 mapscript?
 maybe it relates to my question herehttp://gis.stackexchange.com/questions/102862/when-to-choose-mapscript-over-mapfile-or-vice-versa

 
 :-)
 thanks allot!dovi

 On Mon, Jun 23, 2014
 at 6:13 PM, Carlos Ruiz <boolean10001 <at> yahoo.com>
 wrote:

 
 Do,
 If
 you want to do this without using mapscript, you can pull
 the gradient calculation as an attribute from your data
 table.

 
 ALTER TABLE mytable ADD COLUMN gradient_color
 VARCHAR;
 UPTATE mytable SET gradient_color = floor(gradient *
 255)::text || ' 0 0';

 Cheers

  Mtro. Carlos Ruiz

  

 On Monday, June 23, 2014 4:59 PM, "Lime, Steve D
 (MNIT)" <Steve.Lime <at> state.mn.us>
 wrote:

     

  

 You can compute a color
 string using PostgreSQL string functions: 
    
   SELECT percentage ||
 ‘ 0 0’ AS color FROM … 
    
 Steve 
    
 From: mapserver-users-bounces <at> lists.osgeo.org
 [mailto:mapserver-users-bounces <at> lists.osgeo.org]
 On Behalf Of Do Wi

 Sent: Sunday, June 22, 2014 3:50 PM

 To: mapserver-users <at> lists.osgeo.org

 Subject: [mapserver-users] color attribute
 question 
    

 hi! 

    

 
 i have this
 scenario: 

 
 i have a column in my
 postgis table which contains a double representing a
 percentage. 

 
    

 
 i want to color my
 polygons in a gradient fashion based on that
 number. 

 
    

 
 the docs states three
 ways to specify color: 

 
 1. three [1-255]
 numbers 

 
 2. hex
 string 

 
 3.
 [attribute] 

 
    

 
 but the attribute must
 be a string by itself in the same format as options 1 or
 2. 

 
    

 
 how can i achieve
 something like  

 
    

 
 COLOR [percentage]*255 0
 0 

 
 or 

 
 COLOR [percentage] 0
 0 

 
 if percentageis already
 0..255 

 
    

 
 for a red gradient for
 example?  

 
    

 
 thanks
 allot! 

 

 
 _______________________________________________
 mapserver-users mailing list
 mapserver-users <at> lists.osgeo.org

 http://lists.osgeo.org/mailman/listinfo/mapserver-users 
_______________________________________________
mapserver-users mailing list
mapserver-users <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
Størner.Henrik Juul HSO | 26 Jun 13:03 2014
Picon

Mapcache on Windows with IIS - any binaries available?

Hi,

 

I am trying to setup a mapserver+mapcache installation on Windows 2012, using IIS as the webserver.

 

(The powers that be insist on trying it on Windows before doing it on Linux…)

 

I’ve found the mapserver binaries on http://www.gisinternals.com/sdk/, and have mapserver working in FastCGI mode on IIS. So I’d like to add mapcache to the software stack, but it isn’t included in the gisinternals.com package. I have seen Paul James’ message that building and running it is possible http://lists.osgeo.org/pipermail/mapserver-users/2013-March/074294.html - but I don’t have Visual C available.

 

So I guess what I am really asking for is: Is there a precompiled binary of mapcache for Windows x64 available anywhere?

 

Thanks in advance.

 

 

Best regards / Venlig hilsen

 

Henrik Juul Størner, Servicearkitekt

 

 Application Technology

 

Lautrupparken 40-42, DK-2750 Ballerup

Direkte +4544604433 Mobil +4591375751

Vi gør opmærksom på, at denne e-mail kan indeholde fortrolig information. Hvis du ved en fejltagelse modtager e-mailen, beder vi dig venligst informere afsender om fejlen ved at bruge svarfunktionen. Samtidig beder vi dig slette e-mailen i dit system uden at videresende eller kopiere den. Selvom e-mailen og ethvert vedhæftet bilag efter vores overbevisning er fri for virus og andre fejl, som kan påvirke computeren eller it-systemet, hvori den modtages og læses, åbnes den på modtagerens eget ansvar. Vi påtager os ikke noget ansvar for tab og skade, som er opstået i forbindelse med at modtage og bruge e-mailen.

Please note that this message may contain confidential information. If you have received this message by mistake, please inform the sender of the mistake by sending a reply, then delete the message from your system without making, distributing or retaining any copies of it. Although we believe that the message and any attachments are free from viruses and other errors that might affect the computer or it-system where it is received and read, the recipient opens the message at his or her own risk. We assume no responsibility for any loss or damage arising from the receipt or use of this message.

_______________________________________________
mapserver-users mailing list
mapserver-users <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
Basques, Bob (CI-StPaul | 25 Jun 16:11 2014
Picon
Picon

PDF output and file naming (.pdf)

All,

I got the PDF output to work, but the outputted file ends up being output as <some_name>.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 <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
Travis Kirstine | 25 Jun 15:17 2014

MapCache inverted Y values

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?


   <grid name="gmaps_512">
      <extent>-20037508.3427892480 -20037508.3427892480 20037508.3427892480 20037508.3427892480</extent>
      <srs>EPSG:3857</srs>
      <srsalias>EPSG:900913</srsalias>
      <units>m</units>
      <size>512 512</size>
      <resolutions>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</resolutions>
   </grid>


   <cache name="disk" type="disk">
      <base>/opt/mapcache/512_cache</base>
      <creation_retry>10</creation_retry>
      <symlink_blank/>
   </cache>



  <tileset name="default_512">
    <source>default_wms</source>
    <cache>disk</cache>
    <grid>gmaps_512</grid>
    <format>mixed</format>
    <metatile>2 2</metatile>
    <metabuffer>10</metabuffer>
  </tileset>

  <source name="default_wms" type="wms">
    <getmap><params>
    <format>image/png</format>
    <layers>default</layers>
    <transparent>true</transparent>
    </params></getmap>
    <http><url>http://wmts2.firstbasesolutions.com/cgi-bin/mapserver_wms_fcgi</url></http>
  </source>






--

Travis Kirstine
First Base Solutions Inc.
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 <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
Malm Paul | 25 Jun 07:36 2014

Map data strategy

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 <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
Kalbermatten Michaël | 24 Jun 17:02 2014
Picon

SIZEUNITS set to meters

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 400000 100000 800000 300000

 

    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 <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
Stefanos Anastasiou | 24 Jun 16:23 2014
Picon

htdocs settings and mapfile status

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 <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
Krishna Priya Patury | 24 Jun 15:30 2014
Picon

Re: PostGIS Connection Failure

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 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.
 


On Mon, Jun 23, 2014 at 5:24 PM, Krishna <krishna.patury <at> gmail.com> 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 <pramsey <at> cleverelephant.ca> 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.patury <at> 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 <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Gmane