1 votos

Mapa vacío MapServer Kerneldensity

Estoy intentando generar un mapa de calor a partir de mi tabla PostGIS, pero mi mapa está vacío...

Aquí está mi archivo de configuración:

LAYER
  NAME feature_heatmap
  TYPE raster
  CONNECTIONTYPE kerneldensity
  CONNECTION "point_data"
  STATUS ON

  PROCESSING "RANGE_COLORSPACE=HSL"
  PROCESSING "KERNELDENSITY_RADIUS=50"
  PROCESSING "KERNELDENSITY_COMPUTE_BORDERS=ON"
  PROCESSING "KERNELDENSITY_NORMALIZATION=auto"
  OFFSITE 0 0 0

    CLASS
        STYLE
            COLORRANGE  "#0000FFFF"  "#FF0000FF"
            DATARANGE 0 255
        END
    END
 END

Y mi capa "point_data":

layer
    name "point_data"
    status on
    processing "close_connection=defer"
    extent -180 -90 180 90
    projection
        "init=epsg:4326"
    end
    connectiontype postgis
    connection "MY CONNECTION STRING"
    data "geom from my_geom_table using unique id using srid=4326"
    type point
    metadata
        "ows_title" "feature_heatmap"
        "ows_abstract" "Test heatmap"
        "ows_srs" "epsg:4326"
        "ows_enable_request" "*"
        "wms_timeitem" "pass_time"
        "wms_timeextent" "2001-01-01/2018-12-31"
        "wms_timedefault" "2001-01-01"
    end
end

Mi resultado: enter image description here

Sólo la capa "point_data":

enter image description here

1voto

Joe Puntos 16

Tu archivo de mapas me funciona. Hice algunos pequeños cambios y digitalicé algunos puntos en un shapefile "heatmap_points.shp" como datos de prueba.

Este es mi archivo de mapas

MAP
  NAME ""
  STATUS ON
MAXSIZE 5000  
CONFIG "MS_ERRORFILE" "c:\ms4w\apps\heatmap_error.txt"
CONFIG "CPL_DEBUG" "ON"
EXTENT -180 -90 180 90
  SIZE 600 600 
  SHAPEPATH "c:/ms4w/tmp/ms_tmp"
  IMAGECOLOR 255 255 255
  UNITS METERS
  WEB
    IMAGEPATH "c:/ms4w/tmp/ms_tmp"
    IMAGEURL "c:/ms4w/tmp/ms_tmp"
      METADATA
      "ows_enable_request" "*"      
      "wms_srs"    "EPSG:4326"
      "wms_onlineresource"    "http://localhost:80/cgi-bin/mapserv?map=c:/ms4w/apps/heatmap.map"
      "wms_title"    "heatmaptest"
     END
  END
    PROJECTION
    "init=epsg:4326" 
  END
  DEBUG OFF

  LAYER
  NAME feature_heatmap
  TYPE raster
  CONNECTIONTYPE kerneldensity
  CONNECTION "point_data"
  STATUS ON

  PROCESSING "RANGE_COLORSPACE=HSL"
  PROCESSING "KERNELDENSITY_RADIUS=50"
  PROCESSING "KERNELDENSITY_COMPUTE_BORDERS=ON"
  PROCESSING "KERNELDENSITY_NORMALIZATION=auto"
  OFFSITE 0 0 0

    CLASS
        STYLE
            COLORRANGE  "#0000FFFF"  "#FF0000FF"
            DATARANGE 0 255
        END
    END
 END

layer
    name "point_data"
    status on
    extent -180 -90 180 90
    projection
        "init=epsg:4326"
    end
    data heatmap_points
    type point
    metadata
        "ows_title" "heatmap_points"
        "ows_abstract" "Test heatmap"
        "ows_srs" "epsg:4326"
        "ows_enable_request" "*"
    end
end   

END

Esta es mi solicitud de WMS GetMap:

http://localhost/cgi-bin/mapserv.exe?
map=c:\ms4w\apps\heatmap.map&
REQUEST=GetMap&
SERVICE=WMS&
VERSION=1.1.1&
WIDTH=1284&
HEIGHT=744&
LAYERS=feature_heatmap&
TRANSPARENT=TRUE&
FORMAT=image%2Fpng&
BBOX=-170.68595869761833,-22.853271028037383,-27.082732891166728,60.356074766355135&
SRS=EPSG:4326&
STYLES=

Y este es el resultado que se muestra junto con el mapa de EE.UU. de otro SGA

enter image description here

i-Ciencias.com

I-Ciencias es una comunidad de estudiantes y amantes de la ciencia en la que puedes resolver tus problemas y dudas.
Puedes consultar las preguntas de otros usuarios, hacer tus propias preguntas o resolver las de los demás.

Powered by:

X