Discussion:
LAYER example for kernerdensity wanted
Rahkonen Jukka (Tike)
2014-09-27 19:51:05 UTC
Permalink
Hi,

I am running MapServer version 6.5-dev on Windows and I suppose it has the support for kerneldensity layers. Could someone show the LAYER part that works with the Natural Earth populated places dataset http://www.naturalearthdata.com/http//www.naturalearthdata.com/download/10m/cultural/ne_10m_populated_places.zip? I have created .qix index but not touched the data in other ways.

I have indeed managed to get some coloured stripes out at some scales but what I mostly get is Internal server error (http 500). MS_ERRORFILE does not show any errors and Apache error log is probably recording just this:
[Sat Sep 27 21:57:27 2014] [error] [client 127.0.0.1] Premature end of script headers: mapserv.exe

My current LAYER (or layers, one for data and one for kerneldensity):

LAYER
NAME "points"
DATA "c:\data\ne\ne_10m_populated_places"
TYPE POINT
STATUS ON
PROJECTION
"init=epsg:4326"
END
debug 5
CLASS
STYLE
SIZE 5
SYMBOL "circle"
COLOR 200 200 200
OUTLINECOLOR 0 0 0
END
END
END
layer
name "heatmap"
type raster
connectiontype kerneldensity
connection "points"
status on
debug 5
#processing "RANGE_COLORSPACE=HSL"
processing "KERNELDENSITY_RADIUS=20"
processing "KERNELDENSITY_ATTRIBUTE=RANK_MIN"
#processing "KERNELDENSITY_COMPUTE_BORDERS=ON"
processing "KERNELDENSITY_NORMALIZATION=AUTO"
offsite 0 0 0
class
style
COLORRANGE "#0000ff00" "#0000ffff"
DATARANGE 0 32
end
style
COLORRANGE "#0000ffff" "#ff0000ff"
DATARANGE 32 255
end
end
end

What I have tried so far has been to comment out this and that but result seems to be always the same.

-Jukka Rahkonen-
Rahkonen Jukka (Tike)
2014-09-28 16:44:01 UTC
Permalink
Hi,

I believe that this kind of lines appear into the Apache error log when I try to get heatmap to render:

[Sun Sep 28 19:37:18 2014] [error] [client 127.0.0.1] GDAL: GDALOpen(MEM:::DATAPOINTER=03359B30,PIXELS=459,LINES=346,BANDS=1,DATATYPE=Byte,PIXELOFFSET=1,LINEOFFSET=459, this=03355E60) succeeds as MEM.\r
[Sun Sep 28 19:37:19 2014] [error] [client 127.0.0.1] Premature end of script headers: mapserv.exe
[Sun Sep 28 19:37:19 2014] [error] [client 127.0.0.1] GDAL: GDALOpen(MEM:::DATAPOINTER=00FB9B30,PIXELS=459,LINES=346,BANDS=1,DATATYPE=Byte,PIXELOFFSET=1,LINEOFFSET=459, this=00FB5E60) succeeds as MEM.\r

-Jukka-



Rahkonen, Jukka wrote:
>
> Hi,
>
> I am running MapServer version 6.5-dev on Windows and I suppose it has the
> support for kerneldensity layers. Could someone show the LAYER part that
> works with the Natural Earth populated places dataset
> http://www.naturalearthdata.com/http//www.naturalearthdata.com/downloa
> d/10m/cultural/ne_10m_populated_places.zip? I have created .qix index but not
> touched the data in other ways.
>
> I have indeed managed to get some coloured stripes out at some scales but
> what I mostly get is Internal server error (http 500). MS_ERRORFILE does not
> show any errors and Apache error log is probably recording just this:
> [Sat Sep 27 21:57:27 2014] [error] [client 127.0.0.1] Premature end of script
> headers: mapserv.exe
>
> My current LAYER (or layers, one for data and one for kerneldensity):
>
> LAYER
> NAME "points"
> DATA "c:\data\ne\ne_10m_populated_places"
> TYPE POINT
> STATUS ON
> PROJECTION
> "init=epsg:4326"
> END
> debug 5
> CLASS
> STYLE
> SIZE 5
> SYMBOL "circle"
> COLOR 200 200 200
> OUTLINECOLOR 0 0 0
> END
> END
> END
> layer
> name "heatmap"
> type raster
> connectiontype kerneldensity
> connection "points"
> status on
> debug 5
> #processing "RANGE_COLORSPACE=HSL"
> processing "KERNELDENSITY_RADIUS=20"
> processing "KERNELDENSITY_ATTRIBUTE=RANK_MIN"
> #processing "KERNELDENSITY_COMPUTE_BORDERS=ON"
> processing "KERNELDENSITY_NORMALIZATION=AUTO"
> offsite 0 0 0
> class
> style
> COLORRANGE "#0000ff00" "#0000ffff"
> DATARANGE 0 32
> end
> style
> COLORRANGE "#0000ffff" "#ff0000ff"
> DATARANGE 32 255
> end
> end
> end
>
> What I have tried so far has been to comment out this and that but result seems
> to be always the same.
>
> -Jukka Rahkonen-
> _______________________________________________
> mapserver-users mailing list
> mapserver-***@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
Rahkonen Jukka (Tike)
2014-09-29 08:17:21 UTC
Permalink
Hi Thomas,

I have the newest MS4W on the bottom. Then I have downloaded 32-bit GDAL-Mapserver development zip from gisinternals.com http://gisinternals.com/sdk/PackageList.aspx?file=release-1600-gdal-mapserver.zip and changed the contents of the cgi-bin directory by copying all the .dll files from \bin and mapserv.exe from \bin\ms\apps of the gisinternals package. I have no idea about how safe this method is or if it works with PHP MapScript at all. I have only tried to test new features introduced after Mapserver v. 6.2 through WMS.

It can well be that my trouble with kerneldensity map is caused by some mismatch with MS4W and the newer components and therefore I would like to see a mapfile that works for someone on some platform with that easily available point data.

-Jukka Rahkonen-

Thomas RAFFIN wrote:

Hi,

Could you tell me how you have install / compile MS 6.5-dev on Windows please?
does it works with Apache and PHP (PHP MapScript) ?

Thanks,

Thomas
Le 27/09/2014 21:51, Rahkonen Jukka (Tike) a écrit :

Hi,



I am running MapServer version 6.5-dev on Windows and I suppose it has the support for kerneldensity layers. Could someone show the LAYER part that works with the Natural Earth populated places dataset http://www.naturalearthdata.com/http//www.naturalearthdata.com/download/10m/cultural/ne_10m_populated_places.zip<http://www.naturalearthdata.com/http/www.naturalearthdata.com/download/10m/cultural/ne_10m_populated_places.zip>? I have created .qix index but not touched the data in other ways.



I have indeed managed to get some coloured stripes out at some scales but what I mostly get is Internal server error (http 500). MS_ERRORFILE does not show any errors and Apache error log is probably recording just this:

[Sat Sep 27 21:57:27 2014] [error] [client 127.0.0.1] Premature end of script headers: mapserv.exe



My current LAYER (or layers, one for data and one for kerneldensity):



LAYER

NAME "points"

DATA "c:\data\ne\ne_10m_populated_places"

TYPE POINT

STATUS ON

PROJECTION

"init=epsg:4326"

END

debug 5

CLASS

STYLE

SIZE 5

SYMBOL "circle"

COLOR 200 200 200

OUTLINECOLOR 0 0 0

END

END

END

layer

name "heatmap"

type raster

connectiontype kerneldensity

connection "points"

status on

debug 5

#processing "RANGE_COLORSPACE=HSL"

processing "KERNELDENSITY_RADIUS=20"

processing "KERNELDENSITY_ATTRIBUTE=RANK_MIN"

#processing "KERNELDENSITY_COMPUTE_BORDERS=ON"

processing "KERNELDENSITY_NORMALIZATION=AUTO"

offsite 0 0 0

class

style

COLORRANGE "#0000ff00" "#0000ffff"

DATARANGE 0 32

end

style

COLORRANGE "#0000ffff" "#ff0000ff"

DATARANGE 32 255

end

end

end



What I have tried so far has been to comment out this and that but result seems to be always the same.



-Jukka Rahkonen-

_______________________________________________

mapserver-users mailing list

mapserver-***@lists.osgeo.org<mailto:mapserver-***@lists.osgeo.org>

http://lists.osgeo.org/mailman/listinfo/mapserver-users





--

Thomas RAFFIN
Chef de Projet Internet
***@sirap.fr<mailto:***@sirap.fr>

[Sirap]<http://sirap.fr>

Tel : 04 75 72 84 10
Fax : 04 75 70 07 98
Rue Paul Louis Héroult - BP 253
26106 Romans cedex
thomas bonfort
2014-09-29 08:33:42 UTC
Permalink
Jukka,
The msautotest suite has some heatmap examples you can work from:
https://github.com/mapserver/msautotest/blob/master/gdal/heat.map

--
thomas

On 29 September 2014 10:17, Rahkonen Jukka (Tike) <***@mmmtike.fi
> wrote:

> Hi Thomas,
>
>
>
> I have the newest MS4W on the bottom. Then I have downloaded 32-bit
> GDAL-Mapserver development zip from gisinternals.com
> http://gisinternals.com/sdk/PackageList.aspx?file=release-1600-gdal-mapserver.zip
> and changed the contents of the cgi-bin directory by copying all the .dll
> files from \bin and mapserv.exe from \bin\ms\apps of the gisinternals
> package. I have no idea about how safe this method is or if it works with
> PHP MapScript at all. I have only tried to test new features introduced
> after Mapserver v. 6.2 through WMS.
>
>
>
> It can well be that my trouble with kerneldensity map is caused by some
> mismatch with MS4W and the newer components and therefore I would like to
> see a mapfile that works for someone on some platform with that easily
> available point data.
>
>
>
> -Jukka Rahkonen-
>
>
>
> Thomas RAFFIN wrote:
>
>
>
> Hi,
>
> Could you tell me how you have install / compile MS 6.5-dev on Windows
> please?
> does it works with Apache and PHP (PHP MapScript) ?
>
> Thanks,
>
> Thomas
>
> Le 27/09/2014 21:51, Rahkonen Jukka (Tike) a écrit :
>
> Hi,
>
>
>
> I am running MapServer version 6.5-dev on Windows and I suppose it has the support for kerneldensity layers. Could someone show the LAYER part that works with the Natural Earth populated places dataset http://www.naturalearthdata.com/http//www.naturalearthdata.com/download/10m/cultural/ne_10m_populated_places.zip <http://www.naturalearthdata.com/http/www.naturalearthdata.com/download/10m/cultural/ne_10m_populated_places.zip>? I have created .qix index but not touched the data in other ways.
>
>
>
> I have indeed managed to get some coloured stripes out at some scales but what I mostly get is Internal server error (http 500). MS_ERRORFILE does not show any errors and Apache error log is probably recording just this:
>
> [Sat Sep 27 21:57:27 2014] [error] [client 127.0.0.1] Premature end of script headers: mapserv.exe
>
>
>
> My current LAYER (or layers, one for data and one for kerneldensity):
>
>
>
> LAYER
>
> NAME "points"
>
> DATA "c:\data\ne\ne_10m_populated_places"
>
> TYPE POINT
>
> STATUS ON
>
> PROJECTION
>
> "init=epsg:4326"
>
> END
>
> debug 5
>
> CLASS
>
> STYLE
>
> SIZE 5
>
> SYMBOL "circle"
>
> COLOR 200 200 200
>
> OUTLINECOLOR 0 0 0
>
> END
>
> END
>
> END
>
> layer
>
> name "heatmap"
>
> type raster
>
> connectiontype kerneldensity
>
> connection "points"
>
> status on
>
> debug 5
>
> #processing "RANGE_COLORSPACE=HSL"
>
> processing "KERNELDENSITY_RADIUS=20"
>
> processing "KERNELDENSITY_ATTRIBUTE=RANK_MIN"
>
> #processing "KERNELDENSITY_COMPUTE_BORDERS=ON"
>
> processing "KERNELDENSITY_NORMALIZATION=AUTO"
>
> offsite 0 0 0
>
> class
>
> style
>
> COLORRANGE "#0000ff00" "#0000ffff"
>
> DATARANGE 0 32
>
> end
>
> style
>
> COLORRANGE "#0000ffff" "#ff0000ff"
>
> DATARANGE 32 255
>
> end
>
> end
>
> end
>
>
>
> What I have tried so far has been to comment out this and that but result seems to be always the same.
>
>
>
> -Jukka Rahkonen-
>
> _______________________________________________
>
> mapserver-users mailing list
>
> mapserver-***@lists.osgeo.org
>
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>
>
>
>
>
>
> --
>
> Thomas RAFFIN
> Chef de Projet Internet
> ***@sirap.fr
>
> [image: Sirap] <http://sirap.fr>
>
> Tel : 04 75 72 84 10
> Fax : 04 75 70 07 98
> Rue Paul Louis Héroult - BP 253
> 26106 Romans cedex
>
>
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-***@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
Rahkonen Jukka (Tike)
2014-09-29 09:22:06 UTC
Permalink
Thanks Thomas,

Now I know for sure that my Mapserver just can’t handle it. With that mapfile and the pnts.shp file it is using all I get is still “Premature end of script headers: mapserv.exe”. I will test again when I get a proper Mapserver 6.5 / 7.0 Windows build in my hands.

-Jukka-

thomas bonfort wrote:

Jukka,
The msautotest suite has some heatmap examples you can work from: https://github.com/mapserver/msautotest/blob/master/gdal/heat.map

--
thomas

On 29 September 2014 10:17, Rahkonen Jukka (Tike) <***@mmmtike.fi<mailto:***@mmmtike.fi>> wrote:
Hi Thomas,

I have the newest MS4W on the bottom. Then I have downloaded 32-bit GDAL-Mapserver development zip from gisinternals.com<http://gisinternals.com> http://gisinternals.com/sdk/PackageList.aspx?file=release-1600-gdal-mapserver.zip and changed the contents of the cgi-bin directory by copying all the .dll files from \bin and mapserv.exe from \bin\ms\apps of the gisinternals package. I have no idea about how safe this method is or if it works with PHP MapScript at all. I have only tried to test new features introduced after Mapserver v. 6.2 through WMS.

It can well be that my trouble with kerneldensity map is caused by some mismatch with MS4W and the newer components and therefore I would like to see a mapfile that works for someone on some platform with that easily available point data.

-Jukka Rahkonen-

Thomas RAFFIN wrote:

Hi,

Could you tell me how you have install / compile MS 6.5-dev on Windows please?
does it works with Apache and PHP (PHP MapScript) ?

Thanks,

Thomas
Le 27/09/2014 21:51, Rahkonen Jukka (Tike) a écrit :

Hi,



I am running MapServer version 6.5-dev on Windows and I suppose it has the support for kerneldensity layers. Could someone show the LAYER part that works with the Natural Earth populated places dataset http://www.naturalearthdata.com/http//www.naturalearthdata.com/download/10m/cultural/ne_10m_populated_places.zip<http://www.naturalearthdata.com/http/www.naturalearthdata.com/download/10m/cultural/ne_10m_populated_places.zip>? I have created .qix index but not touched the data in other ways.



I have indeed managed to get some coloured stripes out at some scales but what I mostly get is Internal server error (http 500). MS_ERRORFILE does not show any errors and Apache error log is probably recording just this:

[Sat Sep 27 21:57:27 2014] [error] [client 127.0.0.1] Premature end of script headers: mapserv.exe



My current LAYER (or layers, one for data and one for kerneldensity):



LAYER

NAME "points"

DATA "c:\data\ne\ne_10m_populated_places"

TYPE POINT

STATUS ON

PROJECTION

"init=epsg:4326"

END

debug 5

CLASS

STYLE

SIZE 5

SYMBOL "circle"

COLOR 200 200 200

OUTLINECOLOR 0 0 0

END

END

END

layer

name "heatmap"

type raster

connectiontype kerneldensity

connection "points"

status on

debug 5

#processing "RANGE_COLORSPACE=HSL"

processing "KERNELDENSITY_RADIUS=20"

processing "KERNELDENSITY_ATTRIBUTE=RANK_MIN"

#processing "KERNELDENSITY_COMPUTE_BORDERS=ON"

processing "KERNELDENSITY_NORMALIZATION=AUTO"

offsite 0 0 0

class

style

COLORRANGE "#0000ff00" "#0000ffff"

DATARANGE 0 32

end

style

COLORRANGE "#0000ffff" "#ff0000ff"

DATARANGE 32 255

end

end

end



What I have tried so far has been to comment out this and that but result seems to be always the same.



-Jukka Rahkonen-

_______________________________________________

mapserver-users mailing list

mapserver-***@lists.osgeo.org<mailto:mapserver-***@lists.osgeo.org>

http://lists.osgeo.org/mailman/listinfo/mapserver-users





--
Thomas RAFFIN
Chef de Projet Internet
***@sirap.fr<mailto:***@sirap.fr>

[Sirap]<http://sirap.fr>

Tel : 04 75 72 84 10<tel:04%2075%2072%2084%2010>
Fax : 04 75 70 07 98<tel:04%2075%2070%2007%2098>
Rue Paul Louis Héroult - BP 253
26106 Romans cedex



_______________________________________________
mapserver-users mailing list
mapserver-***@lists.osgeo.org<mailto:mapserver-***@lists.osgeo.org>
http://lists.osgeo.org/mailman/listinfo/mapserver-users
Jeff McKenna
2014-10-20 17:15:12 UTC
Permalink
On 2014-09-27 4:51 PM, Rahkonen Jukka (Tike) wrote:
> Hi,
>
> I am running MapServer version 6.5-dev on Windows and I suppose it has the support for kerneldensity layers. Could someone show the LAYER part that works with the Natural Earth populated places dataset http://www.naturalearthdata.com/http//www.naturalearthdata.com/download/10m/cultural/ne_10m_populated_places.zip? I have created .qix index but not touched the data in other ways.
>
> I have indeed managed to get some coloured stripes out at some scales but what I mostly get is Internal server error (http 500). MS_ERRORFILE does not show any errors and Apache error log is probably recording just this:
> [Sat Sep 27 21:57:27 2014] [error] [client 127.0.0.1] Premature end of script headers: mapserv.exe
>
> My current LAYER (or layers, one for data and one for kerneldensity):
>
> LAYER
> NAME "points"
> DATA "c:\data\ne\ne_10m_populated_places"
> TYPE POINT
> STATUS ON
> PROJECTION
> "init=epsg:4326"
> END
> debug 5
> CLASS
> STYLE
> SIZE 5
> SYMBOL "circle"
> COLOR 200 200 200
> OUTLINECOLOR 0 0 0
> END
> END
> END
> layer
> name "heatmap"
> type raster
> connectiontype kerneldensity
> connection "points"
> status on
> debug 5
> #processing "RANGE_COLORSPACE=HSL"
> processing "KERNELDENSITY_RADIUS=20"
> processing "KERNELDENSITY_ATTRIBUTE=RANK_MIN"
> #processing "KERNELDENSITY_COMPUTE_BORDERS=ON"
> processing "KERNELDENSITY_NORMALIZATION=AUTO"
> offsite 0 0 0
> class
> style
> COLORRANGE "#0000ff00" "#0000ffff"
> DATARANGE 0 32
> end
> style
> COLORRANGE "#0000ffff" "#ff0000ff"
> DATARANGE 32 255
> end
> end
> end
>
> What I have tried so far has been to comment out this and that but result seems to be always the same.
>
> -Jukka Rahkonen-

Hi Jukka,

The good news/bad news is that I can reproduce this same issue on
Windows, with MapServer-master and GDAL (both trunk and 1.11.1 release).
I have built both MapServer and GDAL in debug mode, and have placed
the debug messages (and test case) in a ticket at
https://github.com/mapserver/mapserver/issues/5019 It seems to crash on
a memcpy call by GDAL, hmmm...


-jeff

--
Jeff McKenna
MapServer Consulting and Training Services
http://www.gatewaygeomatics.com/
Jeff McKenna
2014-10-20 17:43:00 UTC
Permalink
On 2014-10-20 2:15 PM, Jeff McKenna wrote:
> On 2014-09-27 4:51 PM, Rahkonen Jukka (Tike) wrote:
>> Hi,
>>
>> I am running MapServer version 6.5-dev on Windows and I suppose it has
>> the support for kerneldensity layers. Could someone show the LAYER
>> part that works with the Natural Earth populated places dataset
>> http://www.naturalearthdata.com/http//www.naturalearthdata.com/download/10m/cultural/ne_10m_populated_places.zip?
>> I have created .qix index but not touched the data in other ways.
>>
>> I have indeed managed to get some coloured stripes out at some scales
>> but what I mostly get is Internal server error (http 500).
>> MS_ERRORFILE does not show any errors and Apache error log is probably
>> recording just this:
>> [Sat Sep 27 21:57:27 2014] [error] [client 127.0.0.1] Premature end of
>> script headers: mapserv.exe
>>
>> My current LAYER (or layers, one for data and one for kerneldensity):
>>
>> LAYER
>> NAME "points"
>> DATA "c:\data\ne\ne_10m_populated_places"
>> TYPE POINT
>> STATUS ON
>> PROJECTION
>> "init=epsg:4326"
>> END
>> debug 5
>> CLASS
>> STYLE
>> SIZE 5
>> SYMBOL "circle"
>> COLOR 200 200 200
>> OUTLINECOLOR 0 0 0
>> END
>> END
>> END
>> layer
>> name "heatmap"
>> type raster
>> connectiontype kerneldensity
>> connection "points"
>> status on
>> debug 5
>> #processing "RANGE_COLORSPACE=HSL"
>> processing "KERNELDENSITY_RADIUS=20"
>> processing "KERNELDENSITY_ATTRIBUTE=RANK_MIN"
>> #processing "KERNELDENSITY_COMPUTE_BORDERS=ON"
>> processing "KERNELDENSITY_NORMALIZATION=AUTO"
>> offsite 0 0 0
>> class
>> style
>> COLORRANGE "#0000ff00" "#0000ffff"
>> DATARANGE 0 32
>> end
>> style
>> COLORRANGE "#0000ffff" "#ff0000ff"
>> DATARANGE 32 255
>> end
>> end
>> end
>>
>> What I have tried so far has been to comment out this and that but
>> result seems to be always the same.
>>
>> -Jukka Rahkonen-
>
> Hi Jukka,
>
> The good news/bad news is that I can reproduce this same issue on
> Windows, with MapServer-master and GDAL (both trunk and 1.11.1 release).
> I have built both MapServer and GDAL in debug mode, and have placed
> the debug messages (and test case) in a ticket at
> https://github.com/mapserver/mapserver/issues/5019 It seems to crash on
> a memcpy call by GDAL, hmmm...
>
>
> -jeff
>

Update: fixed by EvenR in MapServer-master! Thanks Even!

-jeff




--
Jeff McKenna
MapServer Consulting and Training Services
http://www.gatewaygeomatics.com/
Rahkonen Jukka (Tike)
2014-10-22 11:45:46 UTC
Permalink
Jeff McKenna wrote:
Lähetetty: 20. lokakuuta 2014 20:43
Vastaanottaja: mapserver-***@lists.osgeo.org
Aihe: Re: [mapserver-users] LAYER example for kernerdensity wanted

On 2014-10-20 2:15 PM, Jeff McKenna wrote:
>> Hi Jukka,
>>
>> The good news/bad news is that I can reproduce this same issue on
>> Windows, with MapServer-master and GDAL (both trunk and 1.11.1 release).
>> I have built both MapServer and GDAL in debug mode, and have placed
>> the debug messages (and test case) in a ticket at
>> https://github.com/mapserver/mapserver/issues/5019 It seems to crash on
>> a memcpy call by GDAL, hmmm...
>>
>>
>> -jeff
>>

> Update: fixed by EvenR in MapServer-master! Thanks Even!

Hi Jeff and Even,

It works now for me too with the gisinternals binaries. And it works very well indeed.

-Jukka-
Loading...