[MapServer-users] Questions about using c#/mapscript

2023-06-08 Thread Atlanta Geek
I've been using mapserver for a couple of years.
I'd like to generate maps and embed them in emails without running the CGI
service. The maps will be decorated with some linestrings.

Is C# Mapscript the right approach for this? Does mapserver work with .NET
6?

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


Re: [MapServer-users] Layer is opaque

2023-04-21 Thread Atlanta Geek
Thank, that gave me the hint I needed.  jpegs were being requested and not
pngs.  It turned out  the leaflet app I was using defaulted to jpegs even
though I told leaflet the layer was transparent.  I forced png and it
worked.

On Thu, Apr 20, 2023 at 3:51 PM Rahkonen Jukka <
jukka.rahko...@maanmittauslaitos.fi> wrote:

> Hi,
>
>
>
> Work for me in two different ways with this test layer
>
>
>
> LAYER
>
>   NAME "layername"
>
>   TYPE POLYGON
>
>   FEATURE
>
>   POINTS 10 5 15 10 5 10 10 5 END
>
>   END #feature
>
> # opacity defined with COMPOSITE
>
>   COMPOSITE
>   OPACITY 70
>  END # COMPOSITE
>
>   METADATA
>
>   'wms_title' 'layername'
>
>   "wms_srs" "EPSG:4326"
>
>   END #metadata
>
> CLASS
>
> STYLE
>
> #alternatively opacity defined in style
>
> #OPACITY 80
>
> COLOR  210 155 100
>
> END #style
>
> END #class
>
>     END #layer
>
>
>
> The outputformat must be png, jpeg does not support opacity/transparency.
>
>
>
> -Jukka Rahkonen-
>
>
>
> *Lähettäjä:* MapServer-users  
> *Puolesta
> *Atlanta Geek
> *Lähetetty:* torstai 20. huhtikuuta 2023 16.03
> *Vastaanottaja:* mapserver 
> *Aihe:* [MapServer-users] Layer is opaque
>
>
>
> I am trying to use mapserver to display some data but unfortunately the
> map in not visible below the layer. My configuration of my mapserver is
> below. Any guidance would be appreciated.
>
>
>
> MAP
> IMAGETYPE png
> MAXSIZE 4000
> SIZE 800 800
> EXTENT -9583207 3548826 -8999182 4183713
> UNITS meters
> IMAGECOLOR "#FF00"
> WEB
>METADATA
>   "wfs_title" "mapserverdemo"
>   "wfs_enable_request" "*"
>   "wfs_onlineresource" "
> http://localhost:8080/mapserv?map=/etc/mapserver/wms.map;
>   "ows_enable_request" "*"
>   "wms_srs" "EPSG:3857 EPSG:4326"
>   "wfs_srs" "EPSG:3857 EPSG:4326"
>   "labelcache_map_edge_buffer" "-1"
>   "wms_title" "OpenStreetMap"
>   "wms_feature_info_mime_type" "text/plain text/html application/json"
>END
>IMAGEPATH "/ms4w/tmp/ms_tmp/"
>IMAGEURL "/ms_tmp/"
> END
> DEBUG 1
> CONFIG "MS_ERRORFILE" "stderr"
> PROJECTION
>"init=epsg:3857"
> END
> OUTPUTFORMAT
>   NAME "jpeg_png"
>   MIMETYPE "image/vnd.jpeg-png"
>   DRIVER AGG/MIXED
>   IMAGEMODE RGBA
>   FORMATOPTION "TRANSPARENT_FORMAT=png"
>   FORMATOPTION "OPAQUE_FORMAT=jpeg"
> END
>
>
> LAYER
> STATUS DEFAULT
> TYPE POLYGON
> NAME "h3_polygons"
> GROUP "h3"
> CONNECTIONTYPE postgis
> CONNECTION "host=host.docker.internal dbname=h3demo user=postgres
> password=postgres port=5432"
> DATA "geom from pop6 using unique fld using srid=4326"
> COMPOSITE
>   OPACITY 70
> END # COMPOSITE
> CLASS
>   STYLE
>  OUTLINECOLOR 0 0 255
>  WIDTH 3
>   END
>   STYLE
>  COLOR 255 0 0
>  OPACITY 10
>   END
>END
>
>
>
>   PROJECTION #source
> "init=epsg:4326"
>   END
> END
>
> END
>
>
>
> --
>
> http://www.atlantageek.com
>


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


[MapServer-users] Layer is opaque

2023-04-20 Thread Atlanta Geek
I am trying to use mapserver to display some data but unfortunately the map
in not visible below the layer. My configuration of my mapserver is below.
Any guidance would be appreciated.

MAP
IMAGETYPE png
MAXSIZE 4000
SIZE 800 800
EXTENT -9583207 3548826 -8999182 4183713
UNITS meters
IMAGECOLOR "#FF00"
WEB
   METADATA
  "wfs_title" "mapserverdemo"
  "wfs_enable_request" "*"
  "wfs_onlineresource" "
http://localhost:8080/mapserv?map=/etc/mapserver/wms.map;
  "ows_enable_request" "*"
  "wms_srs" "EPSG:3857 EPSG:4326"
  "wfs_srs" "EPSG:3857 EPSG:4326"
  "labelcache_map_edge_buffer" "-1"
  "wms_title" "OpenStreetMap"
  "wms_feature_info_mime_type" "text/plain text/html application/json"
   END
   IMAGEPATH "/ms4w/tmp/ms_tmp/"
   IMAGEURL "/ms_tmp/"
END
DEBUG 1
CONFIG "MS_ERRORFILE" "stderr"
PROJECTION
   "init=epsg:3857"
END
OUTPUTFORMAT
  NAME "jpeg_png"
  MIMETYPE "image/vnd.jpeg-png"
  DRIVER AGG/MIXED
  IMAGEMODE RGBA
  FORMATOPTION "TRANSPARENT_FORMAT=png"
  FORMATOPTION "OPAQUE_FORMAT=jpeg"
END


LAYER
STATUS DEFAULT
TYPE POLYGON
NAME "h3_polygons"
GROUP "h3"
CONNECTIONTYPE postgis
CONNECTION "host=host.docker.internal dbname=h3demo user=postgres
password=postgres port=5432"
DATA "geom from pop6 using unique fld using srid=4326"
COMPOSITE
  OPACITY 70
END # COMPOSITE
CLASS
  STYLE
 OUTLINECOLOR 0 0 255
 WIDTH 3
  END
  STYLE
 COLOR 255 0 0
 OPACITY 10
  END
   END



  PROJECTION #source
"init=epsg:4326"
  END
END

END

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


Re: [mapserver-users] Same database connection across multiple layers

2022-05-13 Thread Atlanta Geek
So I would put the INCLUDE in all the layers, correct?

On Fri, May 13, 2022 at 11:05 AM Richard Greenwood <
richard.greenw...@gmail.com> wrote:

> Use INCLUDE 'pgconn.map'
>
> With pgconn.map looking like:
>
> CONNECTIONTYPE postgis
> CONNECTION "user=USER password=PASSWORD dbname=DATABASE host=127.0.0.1
> port=5432"
> PROCESSING "CLOSE_CONNECTION=DEFER"
>
>
> On Fri, May 13, 2022 at 7:14 AM Atlanta Geek 
> wrote:
>
>> Is there a way to set the db connection only once for multiple layers.
>> We have a very dynamic mapfile with lots of layers and its a pain to
>> replace the db name when doing development or changing for a customer.  We
>> are running ms4w as well.
>>
>>
>> In addition to this is it possible to set the connection string outside
>> the mapfile.  Maybe as an option to the cgi script or something.
>>
>> --
>> http://www.atlantageek.com
>> ___
>> MapServer-users mailing list
>> MapServer-users@lists.osgeo.org
>> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>>
>
>
> --
> Richard W. Greenwood
> www.greenwoodmap.com
>


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


[mapserver-users] Same database connection across multiple layers

2022-05-13 Thread Atlanta Geek
Is there a way to set the db connection only once for multiple layers.
We have a very dynamic mapfile with lots of layers and its a pain to
replace the db name when doing development or changing for a customer.  We
are running ms4w as well.


In addition to this is it possible to set the connection string outside the
mapfile.  Maybe as an option to the cgi script or something.

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


[mapserver-users] (no subject)

2021-10-05 Thread Atlanta Geek
Im attempting to configure mapcache.
I assume that this is covered in this mailing list as well.  Mapcache is
returning images of the map for me but the cache files are not being
written.  Its strange because I can use the seeding command with the same
xml file and its populating the expected directory but when I go through
the mapcache script its not writing to that cache directory.

Any guidance would be appreciated.

The URL Im testing with is this.
http://192.168.112.225/mapcache?service=WMS=GetMap=default==image%2Fpng=true=1.1.1=2048=2048=EPSG%3A3857=-10018754.171394622,0,0,10018754.171394628



mapcache.xml is as follows:

   
   /tmp/mapcache
  
   

   fast
   256

   
  
 
image/jpeg
default
/usr/lib/cgi-bin/osm-bw.map
true
 
  
  
 http://192.168.112.225/cgi-bin/mapserv?
  
   
   
  vmap0
  disk
  WGS84
  g
  png
  3600
   
   png

   
  png
  assemble
  bilinear
  4096
  

  
http://192.168.112.225/cgi-bin/mapserv?transparent=true=/usr/lib/cgi-bin/osm-bw.map


  
   
   
   
   
   
   
   
   report
   /tmp
   debug

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


[mapserver-users] (no subject)

2021-09-28 Thread Atlanta Geek
When using mapcache to my mapserver I am getting the following error.Access
to

* XMLHttpRequest at
'http://192.168.112.225/mapcache/?SERVICE=WMS=GetCapabilities
'
from origin 'http://192.168.115.38 ' has been
blocked by CORS policy: The 'Access-Control-Allow-Origin' header contains
multiple values '*, *', but only one is allowed.*

I think this is caused by the fact that I have a forwarding rule in my
mapcache.xml




*  
http://192.168.112.225/cgi-bin/mapserv?version=1.1.1=/usr/lib/cgi-bin/osm-bw.map

  *
*  *

and in my apache.conf I have this





*Header add Access-Control-Allow-Origin "*"
Options FollowSymLinksAllowOverride NoneRequire all denied*
*--*

So one of the Access-Control-Allow-Origin  comes from the apache server for
the GetCapabilities call and then another is added because the
forwarding_rule adds the header as well.

What is a good way to get around this.  I tried to just add the
access-Control-Allow-Origin rule on the mapcache path but it did not work.


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


Re: [mapserver-users] QGIS WMS SINGLE CONNECTION: MapServer Multiple Maps Request

2021-09-19 Thread Atlanta Geek
You can put both layers in the same group and then use their group name
instead of layer name.

On Sun, Sep 19, 2021, 08:43 1520 gis 
wrote:

> Dear gentlemen,
>
> I have two mapserver layers:
>
> 1 -
> http://acervofundiario.incra.gov.br/i3geo/ogc.php?tema=certificada_sigef_particular_pb
> 2 -
> http://acervofundiario.incra.gov.br/i3geo/ogc.php?tema=certificada_sigef_publico_pb
>
> Is it possible to make a QGIS WMS single connection requesting both layers
> (making the URLs separated by comma)? Or is it possible to retrieve all the
> layers available in the server
> http://acervofundiario.incra.gov.br/i3geo/ogc.php? through a
> getCapabilities request?
>
> Any insight to these questions will be very appreciated.
>
> Kind regards
>
> Julierme
>
>
>
> ___
> 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] Asking about cgi file executing error

2021-09-11 Thread Atlanta Geek
Follow the python instructions here:
https://www.ms4w.com/README_INSTALL.html under the heading 'using the
packaged python installation's

If that does not work send me the apache log file

On Sat, Sep 11, 2021, 20:55 Boubacar Bah  wrote:

> hi everyone i'm trying to run a cgi file with python scripts with url
> below
> *http: // localhost / cgi bin / test_pg.cgi? name = bah*
>  but it gives me the following message* : the server  encounter an
> internal error or misconfiguration and was unable to complete yours request*
>  the cgi file in question contains python scripts whose beginning
> contains a shebang line: *#!/usr/bin/python *
> I don't know what the script doesn't work if someone can help me l'm on
> window and l have the ms4w installation
> Thanks
>
> ___
> 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] Data Stores for mapserver.

2020-05-08 Thread Atlanta Geek
ElasticSearch is one of our options.  Are these available in mapserver.
Though we've been using mapserver for a year now its mostly been crafting
the postgis queries and not much else

On Thu, May 7, 2020 at 4:51 PM Rahkonen Jukka (MML) <
jukka.rahko...@maanmittauslaitos.fi> wrote:

> Hi,
>
>
>
> Do you find anything suitable for you from this list
> https://gdal.org/drivers/vector/index.html?
>
> They are all available for you through OGR connection but it can well be
> that some formats do not work totally out-of-the-box.
>
>
>
> -Jukka Rahkonen-
>
>
>
> *Lähettäjä:* mapserver-users  
> *Puolesta
> *Atlanta Geek
> *Lähetetty:* torstai 7. toukokuuta 2020 21.32
> *Vastaanottaja:* mapserver-users@lists.osgeo.org
> *Aihe:* [mapserver-users] Data Stores for mapserver.
>
>
>
> How difficult is it to add a new datastore to mapserver.  We currently use
> postgres but with a bigger need for deeper data analysis we are looking at
> other datastores for our report engine. Mapserver is one component of this
> engine.  Does anyone have any experience using any other datastore with
> mapserver that is analytics specific?
>
>
>
> --
>
> http://www.atlantageek.com
>


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

[mapserver-users] Data Stores for mapserver.

2020-05-07 Thread Atlanta Geek
How difficult is it to add a new datastore to mapserver.  We currently use
postgres but with a bigger need for deeper data analysis we are looking at
other datastores for our report engine. Mapserver is one component of this
engine.  Does anyone have any experience using any other datastore with
mapserver that is analytics specific?

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

Re: [mapserver-users] Show traffic on roads.

2020-02-27 Thread Atlanta Geek
The display traffic was an example and I was thinking it was just a GUI
thing.  What I am actually modelling is cable laid in the ground.  And what
I want to show is a heatmap representing the likelihood of there being an
issue at this point on the fiber.
The data will be stored as an array of numbers which each cell corresponds
to a distance along a route.  This array could be thousands of values.The
heatmap will be in the shape of the lines. So I did not want to have as
many line segments as I do cells in the array just to represent one cable.

On Thu, Feb 27, 2020 at 12:53 AM Mohit Sindhwani  wrote:

> On 2020-2-26 8:48 am, Erik H wrote:
> > Depends on your requirements. If you just want to visualize typical
> > traffic conditions, MapServer can do the job, it's pretty
> > straightforward. Just join your road geometries with the congestion
> > data (actual speed / free-flow speed), apply some filters (SQL
> > conditions) on road class and maybe congestion (omitting non-congested
> > roads), and render that in the appropriate color.
> >
> > If, on the other hand, you have a feed with speeds that vary
> > frequently, it gets tricky because you can't really use a regular tile
> > cache. I ended up abandoning MapServer for this - the problem was not
> > so much the rendering, but PostGIS was getting overwhelmed. If you get
> > your speed data from a company like HERE or INRIX, you should be able
> > to use their tilers. If not, you have a nice challenge.
>
> How is the data created and stored? How large is the area? We do a bunch
> of things as a traffic services company, and have found that different
> things work better for different scenarios. MapServer and GeoServer have
> both worked for us in the past. The challenge is always on how pretty
> you want it to be, how much compute you're willing to spend, how often
> the data updates, etc.
>
> It's correct that the regular tile cache doesn't expire data in the best
> way to support this :)
>
> Best Regards,
> Mohit.
> 2020-2-27 | 1:44 pm.
>
>
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users



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

[mapserver-users] Show traffic on roads.

2020-02-22 Thread Atlanta Geek
Is there a good way to show heavy traffic using mapserver without drawing
each individual road segment as a different line.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users