<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#ffffff">
Dear Kai and Assefa,<br>
<br>
<br>
<span class="Apple-style-span" style="border-collapse: separate;
color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-style:
normal; font-variant: normal; font-weight: normal; letter-spacing:
normal; line-height: normal; orphans: 2; text-indent: 0px;
text-transform: none; white-space: normal; widows: 2;
word-spacing: 0px; font-size: medium;">
<div style="background-color: transparent;"><span
id="internal-source-marker_0.9552060922142118"
style="font-size: 11pt; font-family: Arial; color: rgb(0, 0,
0); background-color: transparent; font-weight: normal;
font-style: normal; font-variant: normal; text-decoration:
none; vertical-align: baseline; white-space: pre-wrap;"> After
you two guys requested me to send you my setup, I exported the
content in the databasetable to a shapefile so you can test
it. When I tested the spatial filter right after that, it
suddenly worked ! This narrows down the possibilities:</span><br>
<span style="font-size: 11pt; font-family: Arial; color: rgb(0,
0, 0); background-color: transparent; font-weight: normal;
font-style: normal; font-variant: normal; text-decoration:
none; vertical-align: baseline; white-space: pre-wrap;"></span><br>
- The request I send is definitely not the problem anymore. It
works with MapServer + shapefile and with GeoServer.<br>
<br>
<span style="font-size: 11pt; font-family: Arial; color: rgb(0,
0, 0); background-color: transparent; font-weight: normal;
font-style: normal; font-variant: normal; text-decoration:
none; vertical-align: baseline; white-space: pre-wrap;"></span><span
style="font-size: 11pt; font-family: Arial; color: rgb(0, 0,
0); background-color: transparent; font-weight: normal;
font-style: normal; font-variant: normal; text-decoration:
none; vertical-align: baseline; white-space: pre-wrap;">- I
exported only the geometries </span><span
class="Apple-style-span" style="border-collapse: separate;
color: rgb(0, 0, 0); font-family: 'Times New Roman';
font-style: normal; font-variant: normal; font-weight: normal;
letter-spacing: normal; line-height: normal; orphans: 2;
text-indent: 0px; text-transform: none; white-space: normal;
widows: 2; word-spacing: 0px; font-size: medium;"><span
style="font-size: 11pt; font-family: Arial; color: rgb(0, 0,
0); background-color: transparent; font-weight: normal;
font-style: normal; font-variant: normal; text-decoration:
none; vertical-align: baseline; white-space: pre-wrap;">to
the shapefile </span></span><span style="font-size: 11pt;
font-family: Arial; color: rgb(0, 0, 0); background-color:
transparent; font-weight: normal; font-style: normal;
font-variant: normal; text-decoration: none; vertical-align:
baseline; white-space: pre-wrap;">in the table with
geometrytype = POLYGON because from ~8000 geometries ~10 are
linestrings. So I investigated possible problems with the
linestring geometries by telling the MapServer not to serve
them using a subquery in the mapfile:</span><br>
<br>
<span style="font-size: 11pt; font-family: Arial; color: rgb(0,
0, 0); background-color: transparent; font-weight: normal;
font-style: normal; font-variant: normal; text-decoration:
none; vertical-align: baseline; white-space: pre-wrap;">DATA
"the_geom from (select * from alldata where
geometrytype(the_geom) = 'POLYGON') as subquery using unique
product_id using SRID=4326"</span><br>
<br>
Error 500 still occured. Therefore, the data can't be the
problem neither, right?<br>
<br>
<span class="Apple-style-span" style="border-collapse: separate;
color: rgb(0, 0, 0); font-family: 'Times New Roman';
font-style: normal; font-variant: normal; font-weight: normal;
letter-spacing: normal; line-height: normal; orphans: 2;
text-indent: 0px; text-transform: none; white-space: normal;
widows: 2; word-spacing: 0px; font-size: medium;"><span
style="font-size: 11pt; font-family: Arial; color: rgb(0, 0,
0); background-color: transparent; font-weight: normal;
font-style: normal; font-variant: normal; text-decoration:
none; vertical-align: baseline; white-space: pre-wrap;">-
Since I didn't change anything else MapServer must have
problems communicating with the PostGIS database, but why
Error 500 then?</span></span><br>
<span style="font-size: 11pt; font-family: Arial; color: rgb(0,
0, 0); background-color: transparent; font-weight: normal;
font-style: normal; font-variant: normal; text-decoration:
none; vertical-align: baseline; white-space: pre-wrap;"> </span><br>
<span style="font-size: 11pt; font-family: Arial; color: rgb(0,
0, 0); background-color: transparent; font-weight: normal;
font-style: normal; font-variant: normal; text-decoration:
none; vertical-align: baseline; white-space: pre-wrap;">Here
is my mapfile:<br>
<br>
<br>
</span><span style="font-size: 11pt; font-family: Arial; color:
rgb(0, 0, 0); background-color: transparent; font-weight:
normal; font-style: normal; font-variant: normal;
text-decoration: none; vertical-align: baseline; white-space:
pre-wrap;"></span>MAP<br>
NAME "WFS Server"<br>
STATUS ON<br>
SIZE 600 400<br>
SYMBOLSET
"/var/www/html/psa/bhempen/mapservertest/symbols/symbols.sym"<br>
EXTENT -180 -90 180 90<br>
UNITS DD<br>
SHAPEPATH "/var/www/html/psa/bhempen/mapservertest/data/"<br>
IMAGECOLOR 255 255 255<br>
FONTSET
"/var/www/html/psa/bhempen/mapservertest/fonts/fonts.list"<br>
MAXSIZE 4096 # needs to be set because otherwise an error
will appear when rendering images on large screens<br>
<br>
<br>
#IMAGECOLOR 200 200 200 #commented out for WFS<br>
<br>
PROJECTION<br>
'init=epsg:4326'<br>
END<br>
<br>
WEB<br>
TEMPLATE
'/var/www/html/psa/bhempen/mapservertest/template.html'<br>
IMAGEPATH '/var/www/html/psa/bhempen/tmp/'<br>
IMAGEURL '/psa/bhempen/tmp/' <br>
METADATA<br>
"wfs_title" "WFS Demo Server for
MapServer" ## REQUIRED<br>
"wfs_onlineresource"
<a class="moz-txt-link-rfc2396E" href="http://localhost/cgi-bin/psa/mapserv?map=/home/bhempen/wfs.map&">"http://localhost/cgi-bin/psa/mapserv?map=/home/bhempen/wfs.map&"</a>
## Recommended<br>
"wfs_srs" "EPSG:4326" ##
Recommended<br>
"wfs_abstract" "This text describes my
WFS service." ## Recommended<br>
END <br>
END<br>
<br>
LAYER<br>
NAME "omega"<br>
STATUS DEFAULT<br>
TYPE POLYGON<br>
METADATA<br>
"wfs_title" "omega footprints" ##REQUIRED<br>
"wfs_srs" "EPSG:4326" ## REQUIRED<br>
"gml_include_items" "all" ## Optional (serves all
attributes for layer)<br>
"gml_featureid" "product_id" ## REQUIRED<br>
END<br>
PROJECTION<br>
"init=epsg:4326"<br>
END<br>
CONNECTIONTYPE POSTGIS<br>
CONNECTION "host=localhost port=xxx dbname=xxx user=xxx
password=xxx"<br>
DATA "the_geom from alldata using unique product_id using
SRID=4326"<br>
CLASS<br>
STYLE<br>
OUTLINECOLOR 125 0 0<br>
END<br>
END<br>
DUMP TRUE ## REQUIRED<br>
END # layer<br>
<br>
END<br>
<span style="font-size: 11pt; font-family: Arial; color: rgb(0,
0, 0); background-color: transparent; font-weight: normal;
font-style: normal; font-variant: normal; text-decoration:
none; vertical-align: baseline; white-space: pre-wrap;"><br>
</span></div>
</span>Does anyone see a problem with the setup? <br>
<br>
Many thanks to Kai and Assefa for the help so far! I am going to
send you the shapefile (which you could import into the database
with pgsql2shp), the mapfile, and my client.<br>
<br>
Kind regards,<br>
Bryan<br>
<PRE>================================================================================================
This message and any attachments are intended for the use of the addressee or addressees only. The unauthorised disclosure,
use, dissemination or copying (either in whole or in part) of its content is not permitted. If you received this message in
error, please notify the sender and delete it from your system. Emails can be altered and their integrity cannot be guaranteed by
the sender.
Please consider the environment before printing this email.
=================================================================================================
</PRE></body>
</html>