[mapserver-users] Re: Re: Can't get Tinyows WFS Layer to show in OpenLayer

Wang, Ya Ya.Wang at vta.org
Fri Feb 3 13:41:08 EST 2012


The version is 1.1.0rc1. Seems I need to specify both "prefix"/"server" and "ns_prefix/ns_ur" for it to work.. I am wondering why. Thanks.

Ya


-----Original Message-----
From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of mapserver-users-request at lists.osgeo.org
Sent: Friday, February 03, 2012 1:24 AM
To: mapserver-users at lists.osgeo.org
Subject: mapserver-users Digest, Vol 49, Issue 7

Send mapserver-users mailing list submissions to
	mapserver-users at lists.osgeo.org

To subscribe or unsubscribe via the World Wide Web, visit
	http://lists.osgeo.org/mailman/listinfo/mapserver-users
or, via email, send a message with subject or body 'help' to
	mapserver-users-request at lists.osgeo.org

You can reach the person managing the list at
	mapserver-users-owner at lists.osgeo.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of mapserver-users digest..."


Today's Topics:

   1. Re: How to label only largest displayed areas? (Rahkonen Jukka)
   2. Re: Can't get Tinyows WFS Layer to show in	OpenLayer (Wang, Ya)
   3. Re: Re: Can't get Tinyows WFS Layer to show in	OpenLayer
      (Rahkonen Jukka)
   4. Using WFS gml_[item name]_alias (Dejan Gambin)
   5. Re: PostGIS Connection String - Thread Issue? (thomas bonfort)
   6. Legend size problem in GetLegendGraphic request (Dejan Gambin)
   7. WFS GetCapabilities does not work with non-ascii characters
      in mapfile (Rahkonen Jukka)


----------------------------------------------------------------------

Message: 1
Date: Thu, 2 Feb 2012 23:01:23 +0000
From: Rahkonen Jukka <Jukka.Rahkonen at mmmtike.fi>
Subject: [mapserver-users] Re: How to label only largest displayed
	areas?
To: "Lime, Steve D (DNR)" <Steve.Lime at state.mn.us>, "Anzel, Phil -
	NRCS, Fort	Collins, CO" <Phil.Anzel at ftc.usda.gov>,
	"mapserver-users at lists.osgeo.org"	<mapserver-users at lists.osgeo.org>
Message-ID:
	<84446DEF76453C439E9E97E438E13A63067135 at suutari.haapa.mmm.fi>
Content-Type: text/plain; charset="us-ascii"

Hi,

I understood that meaning was to put exactly one label per state. Each state, even tiny ones, should be labeled. But one state should get only one label even if the map window is splitting the state polygon into two or more intersections. Those intersections may be bigger than the tiny state. Not extremely simple.

-Jukka-

________________________________________
L Lime, Steve D (DNR) wrote:

> I'd do this by sorting features based on area (ascending order). This would draw the smallest polygons first, but would put the labels for the shapes with the largest area into the label cache last (where they would be placed and drawn first). I've done this with labeling lakes and it works fine.

Steve

-----Original Message-----
From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Anzel, Phil - NRCS, Fort Collins, CO
Sent: Thursday, February 02, 2012 1:43 PM
To: mapserver-users at lists.osgeo.org
Cc: Anzel, Phil - NRCS, Fort Collins, CO
Subject: [mapserver-users] How to label only largest displayed areas?

Hi, All,

How can I label only the largest displayed areas within an extent? For example, if I'm labeling states of the United States and my extent covers a small region around the Maine, New Hampshire and Massachusetts junction, I only want a single label for each state, chosen by the largest displayed area (within the current map extent) in each state.

I'm using spatial data stored in Microsoft's SQL Server 2008.

I've created an enhancement request ticket (#4173: Define a current layer extent's WKT string for use in Data statement) as one possible approach, but this approach requires a change to MapServer.

Is there a better way?

Thanks.

- Phil Anzel
  Vistronix Inc for USDA/NRCS/ITC

This electronic message contains information generated by the USDA solely for the intended recipients.  Any unauthorized interception of this message or the use or disclosure of the information it contains may violate the law and subject the violator to civil or criminal penalties.  If you believe you have received this message in error, please notify the sender and delete the email immediately.


_______________________________________________
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


------------------------------

Message: 2
Date: Fri, 3 Feb 2012 00:16:21 +0000
From: "Wang, Ya" <Ya.Wang at vta.org>
Subject: [mapserver-users] Re: Can't get Tinyows WFS Layer to show in
	OpenLayer
To: "mapserver-users at lists.osgeo.org"
	<mapserver-users at lists.osgeo.org>
Message-ID: <CD4BEECCEBBAA545974D52EB0A5B6EF1281B23C1 at ROMAIL4.vta.org>
Content-Type: text/plain; charset="us-ascii"

Hello All,

The problem got solved finally. It seems all I need to do is to add two more lines into my TinyOWS configuration.  Maybe fixing the PythonPath helped as well. But this change is what really makes a difference.

Before (not working): 
<layer retrievable="1"
	 writable="0"
         ns_prefix="tows"
         ns_uri="http://myserver:8080/"
	   schema="transit"
         name="lrtstops"
         srid="2227"
         title="LRT Stops" />

After (working now):
<layer retrievable="1"
	 writable="0"
        ns_prefix="tows"
        ns_uri="http://myserver:8080/"
        prefix="tows"
	 server="http://myserver:8080/"
       schema="transit"
       name="lrtstops"
       srid="2227"
       title="LRT Stops" />

I was relieved of the frustration I have been suffering during the past two days. Thanks everyone.

Ya







___________________________________________________________________________
Message: 5
Date: Thu, 2 Feb 2012 08:57:52 +0100
From: Olivier Courtin <olivier.courtin at gmail.com>
Subject: Re: [mapserver-users] Can't get Tinyows WFS Layer to show in
	OpenLayer
To: "mapserver-users at lists.osgeo.org"
	<mapserver-users at lists.osgeo.org>
Message-ID:
	<CAD+A4Nz+q5m4DxjxFMRPAygx9c7eryfU705F330vXE+qRGgeXg at mail.gmail.com>
Content-Type: text/plain; charset="windows-1252"

On Wed, Feb 1, 2012 at 7:33 PM, Wang, Ya <Ya.Wang at vta.org> wrote:

Hi,

 I am a newbie of mapserver and other online mapping technologies.
> Recently, I have been struggling to load a TinyOWS WFS Layer to an
> OpenLayers map.  I set up proxy.cgi, which works fine. I checked TinyOWS
> using command ?tinyows ?check?, which also seems to be working. The page
> http://.../cgi-bin/tinyows.exe?service=wfs&request=getCapabilities&version=1.1.0&typename=tows:lrtstopsdoesn?t return any error either.  I can also load a mapserver WMS layer
> into the OpenLayers Map with no problem. However, no feature from the WFS
> layer would show in the OpenLayers map.  Since both the WMS and WFS layers
> are of the same projection, which is EPSG:2227, I assume that the
> misspecification of projection is not likely to be the caprice here.   The
> following is the JavaScript I used and the response returned. Could someone
> help me find out what I did wrong? Many thanks in advance!
>
> **
>
> **
>

Several questions related to your issue:

- What TinyOWS version do you use ?

- What happen if you use QGIS as WMS/WFS client rather than OpenLayers ?

- Could you activate TinyOWS log and check if there's any error message in
it ?

- Could you use Firebug with OpenLayers to check the TinyOWS output stream ?


HTH,

-- 
Olivier
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20120202/dc523795/attachment.html

------------------------------

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


End of mapserver-users Digest, Vol 49, Issue 4
**********************************************


------------------------------

Message: 3
Date: Fri, 3 Feb 2012 05:16:47 +0000
From: Rahkonen Jukka <Jukka.Rahkonen at mmmtike.fi>
Subject: Re: [mapserver-users] Re: Can't get Tinyows WFS Layer to show
	in	OpenLayer
To: "mapserver-users at lists.osgeo.org"
	<mapserver-users at lists.osgeo.org>
Message-ID:
	<84446DEF76453C439E9E97E438E13A63067193 at suutari.haapa.mmm.fi>
Content-Type: text/plain; charset="us-ascii"

Hi,

Did you mention what version you were using? Perhaps it is version 0.9.0 which was indeed using keywords "prefix" and "server". Change into ns_prefix adn ns_uri was done last spring http://tinyows.org/trac/changeset/343
If that is the case I would recommend updating your TinyOWS to the current release canditate.

-Jukka Rahkonen-

 
________________________________________
 Wang, Ya wrote:

> Hello All,

> The problem got solved finally. It seems all I need to do is to add two more lines into my TinyOWS configuration.  Maybe fixing the PythonPath helped as well. But this change is what really makes a difference.

Before (not working):
<layer retrievable="1"
         writable="0"
         ns_prefix="tows"
         ns_uri="http://myserver:8080/"
           schema="transit"
         name="lrtstops"
         srid="2227"
         title="LRT Stops" />

After (working now):
<layer retrievable="1"
         writable="0"
        ns_prefix="tows"
        ns_uri="http://myserver:8080/"
        prefix="tows"
         server="http://myserver:8080/"
       schema="transit"
       name="lrtstops"
       srid="2227"
       title="LRT Stops" />

I was relieved of the frustration I have been suffering during the past two days. Thanks everyone.

Ya







___________________________________________________________________________
Message: 5
Date: Thu, 2 Feb 2012 08:57:52 +0100
From: Olivier Courtin <olivier.courtin at gmail.com>
Subject: Re: [mapserver-users] Can't get Tinyows WFS Layer to show in
        OpenLayer
To: "mapserver-users at lists.osgeo.org"
        <mapserver-users at lists.osgeo.org>
Message-ID:
        <CAD+A4Nz+q5m4DxjxFMRPAygx9c7eryfU705F330vXE+qRGgeXg at mail.gmail.com>
Content-Type: text/plain; charset="windows-1252"

On Wed, Feb 1, 2012 at 7:33 PM, Wang, Ya <Ya.Wang at vta.org> wrote:

Hi,

 I am a newbie of mapserver and other online mapping technologies.
> Recently, I have been struggling to load a TinyOWS WFS Layer to an
> OpenLayers map.  I set up proxy.cgi, which works fine. I checked TinyOWS
> using command ?tinyows ?check?, which also seems to be working. The page
> http://.../cgi-bin/tinyows.exe?service=wfs&request=getCapabilities&version=1.1.0&typename=tows:lrtstopsdoesn?t return any error either.  I can also load a mapserver WMS layer
> into the OpenLayers Map with no problem. However, no feature from the WFS
> layer would show in the OpenLayers map.  Since both the WMS and WFS layers
> are of the same projection, which is EPSG:2227, I assume that the
> misspecification of projection is not likely to be the caprice here.   The
> following is the JavaScript I used and the response returned. Could someone
> help me find out what I did wrong? Many thanks in advance!
>
> **
>
> **
>

Several questions related to your issue:

- What TinyOWS version do you use ?

- What happen if you use QGIS as WMS/WFS client rather than OpenLayers ?

- Could you activate TinyOWS log and check if there's any error message in
it ?

- Could you use Firebug with OpenLayers to check the TinyOWS output stream ?


HTH,

--
Olivier
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20120202/dc523795/attachment.html

------------------------------

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


End of mapserver-users Digest, Vol 49, Issue 4
**********************************************
_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


------------------------------

Message: 4
Date: Fri, 3 Feb 2012 09:16:43 +0100
From: Dejan Gambin <dejan.gambin at coin.hr>
Subject: [mapserver-users] Using WFS gml_[item name]_alias
To: mapserver-users at lists.osgeo.org
Message-ID: <A0C7880B-FB12-4ADF-9670-951DB461B594 at coin.hr>
Content-Type: text/plain; charset="us-ascii"

Hi,

I am trying to use gml_[item name]_alias for renaming my columns in wfs GetFeature request with gml output. Everything works fine except I can't use some characters like whitespace for example, because it is not a valid xml element.

My question is - is there any way to name my attribute like "my attribute" through WFS GetFeature request? 

Btw, I am presenting the result in a html table, so would be useful, for example, to be able to handle this and other stuff like type for example (integer, string, ..) through the mapfile. And maybe to use this on the client to align data in a table (numbers right, string left, etc.)

Thanks very much on any useful info

regards, dejan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20120203/5ce981ff/attachment-0001.html

------------------------------

Message: 5
Date: Fri, 3 Feb 2012 09:33:15 +0100
From: thomas bonfort <thomas.bonfort at gmail.com>
Subject: Re: [mapserver-users] PostGIS Connection String - Thread
	Issue?
To: Trent Pingenot <pintj at hotmail.com>
Cc: mapserver-users at lists.osgeo.org
Message-ID:
	<CAOM3y2jzW4oGQxoYyzLpducb-2JMBRz5KHcffVNGs=D-tND6yA at mail.gmail.com>
Content-Type: text/plain; charset=UTF-8

There were some changes to string quoting/escaping in version 6 (I think).

Are the errors you are seeing intermittent, or is it reproducible
consistently on all requests?
What happens if you use

CONNECTION "dbname=interlocken user=interlocken ..."

instead of

CONNECTION "dbname='interlocken' user='interlocken' ..."

--
thomas

On Thu, Feb 2, 2012 at 23:00, Trent Pingenot <pintj at hotmail.com> wrote:
> Hi list,
>
> We recently upgraded from MapServer 5.x to 6.0.1 on Linux.?? We have 21 sites
> running all running smoothly with identical configurations off this server.
> On one site the MapServer connection to Postgres/PostGIS fails on all
> layers.?? The MS debug message is as follows
>
> [Thu Feb  2 14:41:04 2012].823297 msPostGISLayerOpen(): Query error.
> Database connection failed (FATAL:  no pg_hba.conf entry for host "[local]",
> user "interlocken", database "nterlocNken", SSL off
> ) with connect string 'dbname='nterlocNken' user='interlocken'
> password=*******************'
>
> And the entry in the map file
>
>     CONNECTIONTYPE postgis
>     PROCESSING "CLOSE_CONNECTION=DEFER"
>     CONNECTION "dbname='interlocken' user='interlocken'
> password='**************'"
>     DATA 'the_geom FROM "ext_lighting_existing_point" USING UNIQUE gid USING
> srid=4326'
>
> I can log into psql on the server as the interlocken user and hit the DB
> just fine so it's not the pg_hba.conf file settings which are set that the
> db username and db name must match.?? My question is why
> does the dbname get corrupted to nterlocNken? Is this a bug or how mapserver
> should present the connection items in a debug statement??? I can use our old
> copy 5.4 copy of mapserver and it runs the map file fine.?? One difference in
> this build is that we don't have the --with-threads support. We are looking
> at getting the build rebuilt with this thread locking option included.
> Could threading be the problem? I'm not sure how/if threading might be
> related but thought I would mention it.
>
> I've stripped out all layers from the mapfile except a single test layer.
> I've got 60+ layers running in other map files and databases with identical
> setups?? on the same server without problems, why this one??? We even tried
> wiping out the DB and associated user and reloading and still the same
> problem.
>
> Thanks in advance for any help or tips you can provide.
>
> Thanks,
>
> Trent
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>


------------------------------

Message: 6
Date: Fri, 3 Feb 2012 09:45:49 +0100
From: Dejan Gambin <dejan.gambin at coin.hr>
Subject: [mapserver-users] Legend size problem in GetLegendGraphic
	request
To: mapserver-users at lists.osgeo.org
Message-ID: <85D8CB63-16B6-43C4-B97D-AC145D8589F0 at coin.hr>
Content-Type: text/plain; charset=us-ascii

Hi,

I have point shapefile and trying to show the points as big circles on the map. So I am using something like:

...
SIZEUNITS kilometers
CLASS
  Name "myname"
  SIZE 10
  ...
END
...

Everything is show ok on the map but the symbol in the legend is very big, and exceeds the symbol key box very much, although KEYSIZE is set to 25 18.

Btw, I am using WMS GetLegendGraphic request for getting the legend

Thanks very much

regards, dejan

------------------------------

Message: 7
Date: Fri, 3 Feb 2012 09:23:35 +0000
From: Rahkonen Jukka <Jukka.Rahkonen at mmmtike.fi>
Subject: [mapserver-users] WFS GetCapabilities does not work with
	non-ascii characters in mapfile
To: "'mapserver-users at lists.osgeo.org'"
	<mapserver-users at lists.osgeo.org>
Message-ID:
	<84446DEF76453C439E9E97E438E13A63067246 at suutari.haapa.mmm.fi>
Content-Type: text/plain; charset="iso-8859-1"

Hi,

This should be simple to test and verify.
Write into WEB METADATA parameters

 "wms_title" "test_?"
 "wfs_title" "test_?"

WMS 1.1.1 GetGapabilities does not have any trouble with "?" and request sends back
...
<Service>
  <Name>OGC:WMS</Name>
  <Title>test_?</Title>
....

However, WFS GetCapabilities response gets truncated. All that Mapserver sends is this

<?xml version="1.0" encoding="ISO-8859-1"?>
<wfs:WFS_Capabilities xmlns:gml="http://www.opengis.net/gml" xmlns:wfs="http://www.opengis.net/wfs" xmlns:ows="http://www.opengis.net/ows" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ogc="http://www.opengis.net/ogc" xmlns="http://www.opengis.net/wfs" version="1.1.0" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd">
  <ows:ServiceIdentification>
    <ows:Title>test_


The same error occurs if non-ascii characters are used in "wfs_abstract".
I was testing on Windows and Mapserver 6.0.1.

-Jukka Rahkonen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20120203/0ca913c5/attachment.html

------------------------------

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


End of mapserver-users Digest, Vol 49, Issue 7
**********************************************


More information about the mapserver-users mailing list