Michael Kleih | 18 Mar 08:47 2015
Picon

Is there a way to convert a QGIS layout into a ".map" file?


Hello all,
I am using Mapserver since nearly 20 years and like it a lot.
QGIS is getting better and better and it would be nice to layout a map 
in QGIS and then convert it to a ".map"-file to be used with Mapserver. 
Does anybody know if this is possible?

Thanks to all,
Michael
_______________________________________________
mapserver-users mailing list
mapserver-users <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Ahmed Aboulenein | 17 Mar 15:18 2015
Picon

Best integration with dynamic map information

Hi ALL,

We serve traffic lines that gets updated every 5 minutes from our feeds. We would like to use Map Server to generate transparent tiles showing colored polylines of the traffic.

I am newbie to Map Server, I got the server and workshop running and also I think I have some good understanding of the map file and layers concept. I have a question about integrating our traffic information as a data source to the MapServer.
Important aspects for us:
1. Performance: since we are updating large areas every 5 minutes. We will need throughput like 10K images per second. Does this sound okay?
2. Threads safety: my concern what happens if while updating the source, the MapServer is actually rendering an image from old data. Any locks?

I understand our options are:
1. Data files: such as shape files or KML files.
2. Database: PostGIS for example.
3. Service that pulls data: WMS server - I didn't dig much here.

Thanks in advance for your help, some pointers or information to go further.

Best regards,
Ahmed
_______________________________________________
mapserver-users mailing list
mapserver-users <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
Karma Kolabor | 17 Mar 01:23 2015
Picon

Rendering OSM Data on Ubuntu 14.04 ?

Hi,

I found this [1] wiki page about Rendering OSM data on Ubuntu 12.04 -
well, now I would like to ask if these instructions are still valid
for Ubuntu 14.04 or if I will run into problems following that guide?

Also I would like to ask: does exist some script (or some recipe for
any configuration management system) that automates the steps
described in the wiki page, what would make it possible to set this up
without too many options for errors?

Thank you very much for your attention,
Karma

[1] https://github.com/mapserver/mapserver/wiki/Rendering-OSM-data-on-Ubuntu-12.04
_______________________________________________
mapserver-users mailing list
mapserver-users <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Rahkonen Jukka (MML | 16 Mar 17:25 2015
Picon

Re: How use a spatialite as tileindex for raster

Hi Andrea,

I share your feelings, it is odd. Therefore I wrote this mail and now when I am lost I can search for
"spatialite ogr tileindex rahkonen"

http://osgeo-org.1560.x6.nabble.com/How-to-use-Spatialite-as-a-TILEINDEX-td4228164.html

-Jukka Rahkonen-

________________________________________
Andrea Peri wrote:

> Hi,
reading the mapserver docs,
I understand that is possible to use every OGR datasource to access a
raster catalog using tileindex.

> So I try to use a spatialite as tileindex.

> I try this setting but without success.

    NAME "rt_ofc2k.ofc2k"
    STATUS OFF
    EXTENT 555870.99 4677465.00 752890.00 4924883.05
    TYPE raster
    CONNECTIONTYPE OGR
    CONNECTION "/pth-to-spatialite/db.sqlite"
    TILEINDEX 'table'
    TILEITEM 'location'

The error reported from log is:

[Mon Mar 16 16:49:58 2015].129679 msShapefileOpen(): Unable to access
file. (/home/..../table)

Perhaps is not true that an OGR spatialite can be used as tileindex source ?

Thx,

--
-----------------
Andrea Peri
. . . . . . . . .
qwerty àèìòù
-----------------
_______________________________________________
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

Andrea Peri | 16 Mar 16:51 2015
Picon

How use a spatialite as tileindex for raster

Hi,
reading the mapserver docs,
I understand that is possible to use every OGR datasource to access a
raster catalog using tileindex.

So I try to use a spatialite as tileindex.

I try this setting but without success.

    NAME "rt_ofc2k.ofc2k"
    STATUS OFF
    EXTENT 555870.99 4677465.00 752890.00 4924883.05
    TYPE raster
    CONNECTIONTYPE OGR
    CONNECTION "/pth-to-spatialite/db.sqlite"
    TILEINDEX 'table'
    TILEITEM 'location'

The error reported from log is:

[Mon Mar 16 16:49:58 2015].129679 msShapefileOpen(): Unable to access
file. (/home/..../table)

Perhaps is not true that an OGR spatialite can be used as tileindex source ?

Thx,

--

-- 
-----------------
Andrea Peri
. . . . . . . . .
qwerty àèìòù
-----------------
_______________________________________________
mapserver-users mailing list
mapserver-users <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
rishi | 16 Mar 10:54 2015
Picon

polygon fill

hi all

iam trying to highlight the villages based on query

but only one polygon is highlighting
the query is based on the area of the villages, when user enters area <=********** ,it is displaying 13 villages in the grid and also same time it has to highlight the villages on the map
my code is 

aspx page

 protected void btnselect_Click(object sender, EventArgs e)
    {
         
        string query = "";

        query = String.Format(" select gid,box(geom),villname,geom,area(geom) from villages where area(geom) " + ddlsymb.SelectedValue + "  " + txtarea.Text + " ");
      
        dt = MyClass.getData(query);

        if (dt == null || dt.Rows.Count == 0)
        {
            Response.Write("No record found, Try Zoom in and click close to feature.");
        }
        else
        {
            dr = dt.Rows[0];
            //String selectedGID = dr["gid"].ToString();

            //gid = selectedGID;
            var layername = "villages";

            for(int i=0;i<dt.Rows.Count;i++)
{
 dr = dt.Rows[i];
 String selectedGID = dr["gid"].ToString();

 gid = selectedGID;
            Response.Write(String.Format( <at> "<script>window.parent.highlightnav('{0}','{1}');</script>", gid, layername));
            //Locate(query);
    }

            if (dt.Columns.Contains("gid"))
            {
                dt.Columns.Remove("gid");
            }
            if (dt.Columns.Contains("geom"))
            {
                dt.Columns.Remove("geom");
            }
            GridView1.DataSource = dt;
            GridView1.DataBind();
        }
    }
  

js page

function highlightnav(gid,layername)
{
   
    bPoint.params.gid = gid;
    bPoint.params.tbl = layername;
    //bPoint.params.getElementById = geom;
    bPoint.redraw();
}


mapfile bpoint.map

MAP
  EXTENT 8240841.450745 2400319.900386 9218007.463612 3107183.406947
  TRANSPARENT on
  IMAGETYPE png
  SIZE 450 500
  SYMBOLSET "symbols.txt" 

  
  web
metadata
wms_srs "EPSG:4326 EPSG:900913"
end
end

  
 
  LAYER
  CONNECTIONTYPE postgis  
  CONNECTION "user=postgres password=****** dbname=mpdb port=5432"
  DATA "geom FROM (select geom,gid from %tbl% where gid=%gid%)as foo using srid=900913 using unique gid"
 
  STATUS Default
  TYPE point

PROJECTION
          "init=epsg:900913"
        END

class  
style
symbol 'line20'
color 255 0 0
size 10
end
  end  
    END  
END


i created for loop, to highlight all the polygons, but it is highlighting only one polygon.
 plz tell me the code





_______________________________________________
mapserver-users mailing list
mapserver-users <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
alok mathur | 16 Mar 09:53 2015
Picon

Re: Calculate length!

Hi Jukka,

When i am trying to run the above ogr command as mentioned by you I am getting an error

ogrinfo -dialect sqlite -sql "select st_length(geometry) from 'Fibertech solution'" doc_test.kml
INFO: Open of `doc_test.kml'
      using driver `LIBKML' successful.
ERROR 1: In ExecuteSQL(): sqlite3_prepare(select st_length(geometry) from 'Fibertech solution'):
  no such function: st_length



Please let me know what the issue is. I have installed both libsqlite3 and libspatialite.

Thanks!
Alok

On Fri, Mar 13, 2015 at 5:04 PM, Rahkonen Jukka (MML) <jukka.rahkonen <at> maanmittauslaitos.fi> wrote:

Hi,

 

You do not need anything else than GDAL which is compiled with libraries  libsqlite3 and  libspatialite.

If you have a suitable GDAL version you should be able to repeat this with the attached small KML file.

 

 

ogrinfo -dialect sqlite -sql "select st_length(geometry) from Layer0" lines.kml

INFO: Open of `lines.kml'

      using driver `LIBKML' successful.

 

Layer name: SELECT

Geometry: None

Feature Count: 2

Layer SRS WKT:

(unknown)

st_length(geometry): Real (0.0)

OGRFeature(SELECT):0

  st_length(geometry) (Real) = 38.2726390753108

 

OGRFeature(SELECT):1

  st_length(geometry) (Real) = 34.5939953221416

 

-Jukka Rahkonen-

 

 

alok mathur wrote:

 

Hi Rahkonen,

 

I have a KML as data source and I am not using sqlite or postgis. 

I am reading the KML from ogrinfo. is there anyway to do the length calculation without using sqlite or postgis.

 

Thanks!

Alok

 

On Fri, Mar 13, 2015 at 3:28 PM, Rahkonen Jukka (MML) <jukka.rahkonen <at> maanmittauslaitos.fi> wrote:

Hi Lars,

 

You should not underestimate GDAL.  Read http://www.gdal.org/ogr_sql_sqlite.html and look at this:

 

ogrinfo -dialect sqlite -sql "select st_length(geometry) from line_demo limit 5" line_demo.shp

INFO: Open of `line_demo.shp'

      using driver `ESRI Shapefile' successful.

 

Layer name: SELECT

Geometry: None

Feature Count: 10

Layer SRS WKT:

(unknown)

st_length(geometry): Real (0.0)

OGRFeature(SELECT):0

  st_length(geometry) (Real) = 638.237633730745

OGRFeature(SELECT):1

  st_length(geometry) (Real) = 32.7179011265525

OGRFeature(SELECT):2

  st_length(geometry) (Real) = 4399.43983906202

OGRFeature(SELECT):3

  st_length(geometry) (Real) = 480.395511976145

OGRFeature(SELECT):4

  st_length(geometry) (Real) = 311.309421824364

-Jukka Rahkonen-

 

 

Schylberg Lars wrote:

 

As far as I know there is no length function in Mapserver.

The only geometry function to use in Expressions is area(shape).

OGR sql doesn’t provide that either as far as I can see in the documentation.

 

So the solutions might be to convert your KML data to  sqlite or postgis where such functions are available.

 

The length of a string (number of characters in the string) can be found in OGR sql with the length function,
but I am assuming You are looking for the geometric length of the linestring.

 

/Lars

 

From: mapserver-users-bounces <at> lists.osgeo.org [mailto:mapserver-users-bounces <at> lists.osgeo.org] On Behalf Of alok mathur
Sent: den 13 mars 2015 07:01
To: mapserver-users <at> lists.osgeo.org
Subject: [mapserver-users] Calculate length!

 

Hi,

 

I want to calculate the length in mapserver. Is it possible. Means i have a linestring and i want to know the length for it. 

Also not could be suggest me how to do it.

 

I am using data source to mapserver as KML.

 

Thanks!

 

--


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



 

--

Alok Mathur | Software Engineer 2A | Ciena
Mobile +91 9899413266




--

Alok Mathur | Software Engineer 2A | Ciena
Mobile +91 9899413266

_______________________________________________
mapserver-users mailing list
mapserver-users <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
Andrea Peri | 14 Mar 16:05 2015
Picon

Using FILTER with OGR and spatialite

Hi,
I'm try-ing without success to set a filter in a spatialite db
I'm not sure my setting are right.

I'm using this settings:

    CONNECTIONTYPE OGR
    CONNECTION '/path-to-spatialite-db/spatialite.sqlite'
    DATA 'table1'
    FILTER "FIELD1 = 'val-1' and (FIELD2 like '%idtpn%' )"
    FILTERITEM 'FIELD1'
    VALIDATION
      'idtpn' '^[a-zA-Z0-9\-_]+$'
      'default_idtpn' '%'
    END

Because I'm see nothing in the map, but no error are reported in debug-log.
I guess the setting are wrong.
But I dont understand what is wrong.

Many thx to everyone .

--

-- 
-----------------
Andrea Peri
. . . . . . . . .
qwerty àèìòù
-----------------
_______________________________________________
mapserver-users mailing list
mapserver-users <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
alok mathur | 13 Mar 07:01 2015
Picon

Calculate length!

Hi,

I want to calculate the length in mapserver. Is it possible. Means i have a linestring and i want to know the length for it. 
Also not could be suggest me how to do it.

I am using data source to mapserver as KML.

Thanks!

--
_______________________________________________
mapserver-users mailing list
mapserver-users <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
Steve.Toutant | 12 Mar 21:19 2015
Picon

MS7 wfs

hello
Using mapserver 7 I make this request to get the number of features in a WFS layer. it returns numberOfFeatures="450361"
http://localhost/cgi-bin/ms7?version=1.1.0&request=getfeature&service=wfs&typename=feature:aqreseau&resultType=hits

this layer is a postgis table on localhost.
This request takes 18 seconds to run with mapserver 7
in postgis select count(*) from  table takes 61ms to run
the same request using a geoserver WFS takes less than 1 second

Is there something that can be done with MS7 to improve performance?
thanks

_______________________________________________
mapserver-users mailing list
mapserver-users <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
Weisbender, Eric | 12 Mar 19:57 2015

box query point data

Hello List,

 

I have a map file with an output projection of utm13.  When I define a point layer that is in wgs84 it will only query one point at a time with a single click.  When I try to query multiple points with a box query it returns nothing.  I can’t find any documentation that even resembles this issue so any help is greatly appreciated.

 

Thanks

Eric

 

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

Gmane