SV: [mapserver-users] Line not drawn in Mapserver WMS

Sture Dingsøyr candalt at online.no
Sun Sep 28 23:29:47 PDT 2008


Hi 

Thanx for tip...have tested to extract the linestrings to a shapefile and added them to ArcView....all the lines are drawn. Also tested in QGis and uDig...where also all the lines are drawn...

Regards
Sture

--------------------------------------------------------------------------------
Fra: Roger André [mailto:randre at gmail.com] 
Sendt: 26. september 2008 17:35
Til: Sture Dingsøyr
Emne: Re: [mapserver-users] Line not drawn in Mapserver WMS


Hi Sture,

Have you confirmed that the linestrings are properly pulled from PostGIS?  I would use pgsql2shp to pull them out and verify that they look ok in a GIS viewer first.

Roger
--


On Fri, Sep 26, 2008 at 6:47 AM, Sture Dingsøyr <candalt at online.no> wrote:

Hi

Have a simple PostGIS layer (linestring) published as a WMS layer in Mapserver.

Am using OpenLayers to view the layer.

But one strange thing happens. The table consists of 3 linestrings, but at a high scale only one of them is drawn in the map.

2 of the linestrings are very short lines, so at high scales they are only drawn as a small dot...but when the extent and scale is high...none of them are drawn in the map.

Is there any logic to this?

Below are my wms url, mapfile and pgdump


Regards
Sture




URL:
http://localhost/wms.aspx?LAYERS=layer_1&TRANSPARENT=true&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&FORMAT=image%2Fpng&SRS=EPSG%3A32633&BBOX=-2838571.5191647126,5343607.668848526,3880571.5191647126,9055392.331151474&WIDTH=1488&HEIGHT=822


Mapfiledef:
LAYER
       PROJECTION
               "init=epsg:32633"
       END
       METADATA
               "wms_title"                     "Kulturminnetur"
               "wms_srs"                       "EPSG:4326 EPSG:25831 EPSG:25832 EPSG:25833 EPSG:25834 EPSG:25835 EPSG:27391 EPSG:27392 EPSG:27393 EPSG:27394 EPSG:27395 EPSG:27396 EPSG:27397 EPSG:27398 EPSG:32631 EPSG:32632 EPSG:32633 EPSG:32634 EPSG:32635 EPSG:102132 EPSG:102133 EPSG:102134 EPSG:102135"
               "wms_abstract"          "For å hente dette tema via WMS må ein nytte layer_294 som verdi i LAYER parameter"
               "gml_include_items"     "all"
       END
       CONNECTION "user=root password=xxxxxxxx dbname=test host=localhost"
       CONNECTIONTYPE postgis
       DATA "geom FROM (SELECT * FROM kl_kulturtur) AS kl_kulturtur USING UNIQUE id USING SRID=32633"
       STATUS off
       TYPE line
       DUMP TRUE
       TEMPLATE "TRUE"
       NAME "layer_1"
       CLASS
               COLOR 248 130 15
               NAME "Kulturminnetur"
               SIZE 4
               SYMBOL "circle"
       END
END


PostgreSQL/PostGIS dump:

--
-- PostgreSQL database dump
--

SET client_encoding = 'SQL_ASCII';
SET check_function_bodies = false;
SET client_min_messages = warning;

SET search_path = public, pg_catalog;

SET default_tablespace = '';

SET default_with_oids = false;

--
-- Name: kl_kulturtur; Type: TABLE; Schema: public; Owner: root; Tablespace:
--

CREATE TABLE kl_kulturtur (
   id integer NOT NULL,
   namn character varying(100),
   omtale character varying(500),
   tema character varying(500),
   fylke integer,
   kommune integer,
   vanskegrad character varying(50),
   framkomstmiddel character varying(100),
   arrangor character varying(150),
   lengde integer,
   geom geometry,
   geom_start geometry,
   geom_stop geometry,
   kontakt_namn character varying(100),
   kontakt_adresse character varying(100),
   kontakt_postnr integer,
   kontakt_poststad character varying(40),
   kontakt_tlf character varying(50),
   kontakt_epost character varying(50),
   isonline integer,
   registrert date,
   lastupdate date,
   webdbreguser character varying(10)
);


ALTER TABLE public.kl_kulturtur OWNER TO root;

--
-- Data for Name: kl_kulturtur; Type: TABLE DATA; Schema: public; Owner: root
--

INSERT INTO kl_kulturtur (id, namn, omtale, tema, fylke, kommune, vanskegrad, framkomstmiddel, arrangor, lengde, geom, geom_start, geom_stop, kontakt_namn, kontakt_adresse, kontakt_postnr, kontakt_poststad, kontakt_tlf, kontakt_epost, isonline, registrert, lastupdate, webdbreguser) VALUES (4, 'Gamlevegen på Grøneng', 'På Grøneng, kring 6 km frå Balestrand austover står det att ein 3 km lang stubb av den gamle bygdevegen som gjekk mellom Balestrand og Tjugum. Du kan parkera nær kyrkja. Vegen går gjennom gardstun  og langs vegen står det stabbesteinar. Her køyrde det store bussar sommar og vinter.   Langs vegen er det fine murar og du vil åg sjå restar av ein enno eldre bygdeveg.  ', '', 1400, 1418, '', 'Gå', 'Balestrand turlag', 1, '0102000020797F000010000000360C94332EA5E640ECB4779B7C005A413481C76C5C9CE640D88D21C293005A4141C57434608CE64073E603EFB5005A41FED18E18F17CE6403D0C3CE1CA005A41EA61AF35A669E64037FFC998D2005A41B7C80F6FDE5BE640144C5864D0005A41D466038C894DE64037FFC998D2005A41F104F7A8343FE640C2CB906ADB005A41EF792AE26236E640073274D3DF005A415C4FB1E28027E6404D98573CE4005A414A6A9EC6071DE6401DCB0177F1005A417862D8385A10E6403A710163FB005A4105ECEBE3C604E640E8F0396906015A4103611F1DF5FBE5400497395510015A41520DE63996F2E540B216725B1B015A41004B868F51EAE540D4C9E38F1D015A41', '0101000020797F0000360C94332EA5E640ECB4779B7C005A41', '0101000020797F0000004B868F51EAE540D4C9E38F1D015A41', 'Balestrand turlag', 'Balestrand turlag', 6899, 'Balestrand', '9999999', 'bt at bt.no', -1, NULL, NULL, 'SDI');
INSERT INTO kl_kulturtur (id, namn, omtale, tema, fylke, kommune, vanskegrad, framkomstmiddel, arrangor, lengde, geom, geom_start, geom_stop, kontakt_namn, kontakt_adresse, kontakt_postnr, kontakt_poststad, kontakt_tlf, kontakt_epost, isonline, registrert, lastupdate, webdbreguser) VALUES (5, 'Gamlevegen langs fjorden i Balestrand sentrum', 'Turen startar i Balestrand sentrum og går sørvestover langs Sognefjorden. Dette er den gamle bygdevegen. Her møter du eit spanande bygningsmiljø med hus i sveitserstil og drakestil. Målarar som Hans Dahl, Hans Andreas Dahl  og Adelsteen Normann budde i dette området. ', 'arkitektur, sveitserstil, målarar, kunstmiljø, strandmiljø', 1400, 1418, '', 'bil, gå', 'Balestrand turistkontor', 1, '0102000020797F00000600000025AFDBA6BC7AE6404C20D3A0D0FF594136C202FD9563E640E7D72D7E38FF5941F4B883538342E640BBC1A3A2C3FE5941B3C59D371433E6403347E33808FE59415334C4FEF931E64003961EDFC3FD59419AB276E13A4AE6400C0209D801FD5941', '0101000020797F000025AFDBA6BC7AE6404C20D3A0D0FF5941', '0101000020797F00009AB276E13A4AE6400C0209D801FD5941', 'Balestrand Reiselivslag', 'Holmen', 6899, 'Balestrand', '9666666', 'br at br.no', -1, NULL, NULL, 'GUR');
INSERT INTO kl_kulturtur (id, namn, omtale, tema, fylke, kommune, vanskegrad, framkomstmiddel, arrangor, lengde, geom, geom_start, geom_stop, kontakt_namn, kontakt_adresse, kontakt_postnr, kontakt_poststad, kontakt_tlf, kontakt_epost, isonline, registrert, lastupdate, webdbreguser) VALUES (100, 'Test', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0102000020797F000002000000000000000017E14000000000A8CB584100000000006A18410000000030C15D41', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);


--
-- Name: pk_kulturtur; Type: CONSTRAINT; Schema: public; Owner: root; Tablespace:
--

ALTER TABLE ONLY kl_kulturtur
   ADD CONSTRAINT pk_kulturtur PRIMARY KEY (id);


--
-- PostgreSQL database dump complete
--

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


More information about the MapServer-users mailing list