Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WMS KML generates incorrect output for MULTILINESTRING #4980

Closed
phopfgartner opened this issue Aug 27, 2014 · 7 comments
Closed

WMS KML generates incorrect output for MULTILINESTRING #4980

phopfgartner opened this issue Aug 27, 2014 · 7 comments

Comments

@phopfgartner
Copy link

When exporting a MULTILINE, the generated KML is not valid.

Basically, starting with the second line in the ulti, all LineString Element are collected as childs in a LineString Element, like:

        <MultiGeometry>
          <LineString>
            <coordinates>
        0.00000000,0.00000000
        897.00000000,0.00000000
        897.00000000,290.00000000
        </coordinates>
          </LineString>
          <LineString>
            <LineString>
              <coordinates>
        0.00000000,580.00000000
        897.00000000,580.00000000
        897.00000000,586.00000000
        </coordinates>
            </LineString>
          </LineString>
        </MultiGeometry>

This is with MapServer 6.4.1 on CentOS 6.

Peter

@phopfgartner
Copy link
Author

Mapfile is:

MAP
NAME "test"
SIZE 256 256    
MAXSIZE 4096
RESOLUTION 72
FONTSET /data/sites/gc/author-pietro/fonts/fonts.list

# CONFIG 'MS_ERRORFILE' '/data/sites/default/gisclient/config/debug/schluchseewerk.debug'
#DEBUG 5
WEB
        METADATA
        # for mapserver 6.0
        "ows_enable_request" "*"
                "ows_title"     "schluchseewerk"

                "wfs_encoding"  "UTF-8"
                "wms_encoding"  "UTF-8"

        "wms_onlineresource" "http://80.92.127.44/gisclient/services/ows.phpproject=schluchseewerk&map=schluchseewerk"
        "wfs_onlineresource" "http://80.92.127.44/gisclient/services/ows.phpproject=schluchseewerk&map=schluchseewerk"
                "wms_feature_info_mime_type"    "text/html"
                "wfs_namespace_prefix"  "feature"
                "wms_srs"       "EPSG:31467"
                "ows_accessconstraints" "Layers eigentuemer, dienstbarkeiten need authentication"
        "wms_enable_request" "*"
        END
        IMAGEPATH "/data/sites/default/gisclient/public/services/tmp/ms_tmp/"
        IMAGEURL "http://80.92.127.44/gisclient/services/tmp/ms_tmp/"   
END     
PROJECTION
        "init=epsg:4326"
END
EXTENT 0 0 1 2
LAYER
        GROUP "test"
        NAME "test"
        TYPE LINE
        STATUS ON
        METADATA
                "wms_group_title" "test"
                "wms_title"     "test"

        END
        PROJECTION
                "init=epsg:4326"
        END
        CONNECTIONTYPE POSTGIS
        CONNECTION "user=test password=testx dbname=test host=192.168.0.13 port=5432"
        DATA "the_geom FROM (SELECT id, name, the_geom FROM kmlmulti) AS foo USING UNIQUE id USING SRID=4326"
        # PROCESSING "CLOSE_CONNECTION=DEFER"
        SIZEUNITS pixels
        LABELITEM "id"
        CLASS
                NAME "test"
                TITLE "test"
                STYLE
                        COLOR 0 0 0
                        SIZE 5
                        MINSIZE 5
                        MAXSIZE 5
                        WIDTH 5
                        MINWIDTH 5
                END
        END
END
END

@phopfgartner
Copy link
Author

SQL data is:

create table kmlmulti (id serial primary key, name text);
select addgeometrycolumn('public', 'kmlmulti', 'the_geom', 4326, 'MULTILINESTRING', 2);
INSERT INTO kmlmulti (name, the_geom) VALUES ('testmulti', ST_SetSRID(GeomFromText('MULTILINESTRING((0 0,1 0,1 1),(0 2,1 2,1 3))'), 4326));

Request is

http://192.168.0.19/cgi-bin/mapserv?map=/data/sites/test/kmlmulti.map&FORMAT=kml&TRANSPARENT=true&LAYERS=test&SERVICE=WMS&REQUEST=GetMap&VERSION=1.1.1&WIDTH=897&HEIGHT=580&BBOX=0,0,1,2&SRS=EPSG%3A4326

mapserv -v tells me, that

MapServer version 6.4.1 OUTPUT=PNG OUTPUT=JPEG OUTPUT=KML SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=CAIRO SUPPORTS=ICONV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI SUPPORTS=GEOS INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE

phopfgartner pushed a commit to phopfgartner/mapserver that referenced this issue Oct 15, 2014
@sdlime
Copy link
Member

sdlime commented Dec 4, 2014

@phopfgartner, has your patch been integrated into master? Would be nice to close this one... --Steve

@phopfgartner
Copy link
Author

Hi @sdlime, looking at the code in master, it's not integrated, yet. Regards, Peter

@sdlime
Copy link
Member

sdlime commented Dec 5, 2014

Do you have a patch ready?

From: Peter Hopfgartner [mailto:notifications@github.com]
Sent: Friday, December 05, 2014 7:29 AM
To: mapserver/mapserver
Cc: Lime, Steve D (MNIT)
Subject: Re: [mapserver] WMS KML generates incorrect output for MULTILINESTRING (#4980)

Hi @sdlimehttps://github.com/sdlime, looking at the code in master, it's not integrated, yet. Regards, Peter


Reply to this email directly or view it on GitHubhttps://github.com//issues/4980#issuecomment-65789438.

@phopfgartner
Copy link
Author

The code is in
phopfgartner@844a6fc
. I had created https://github.com/mapserver/mapserver/pulls, but it
breaked the Travis build. I can try to give it another chance. Since I
changed work, this may take some time.

Regards,

Peter

On Fri, Dec 5, 2014 at 5:20 PM, Steve Lime notifications@github.com wrote:

Do you have a patch ready?

From: Peter Hopfgartner [mailto:notifications@github.com]
Sent: Friday, December 05, 2014 7:29 AM
To: mapserver/mapserver
Cc: Lime, Steve D (MNIT)
Subject: Re: [mapserver] WMS KML generates incorrect output for
MULTILINESTRING (#4980)

Hi @sdlimehttps://github.com/sdlime, looking at the code in master,
it's not integrated, yet. Regards, Peter


Reply to this email directly or view it on GitHub<
https://github.com/mapserver/mapserver/issues/4980#issuecomment-65789438>.


Reply to this email directly or view it on GitHub
#4980 (comment)
.

@mapserver-bot
Copy link

This is an automated comment

This issue has been closed due to lack of activity. This doesn't mean the issue is invalid, it simply got no attention within the last year. Please reopen with missing/relevant information if still valid.

Typically, issues fall in this state for one of the following reasons:

  • Hard, impossible or not enough information to reproduce
  • Missing test case
  • Lack of a champion with interest and/or funding to address the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants