write a mapserver script to draw a red line using a table in postgresql
- User
write a mapserver script to draw a red line using a table in postgresql
Assistant
# This is a MapServer script to draw a red line using a table in PostgreSQL. # Set the output format. OUTPUTFORMAT NAME "png" DRIVER "GD/PNG" EXTENSION "png" MIMETYPE "image/png" MAXSIZE 2048 END # Set the input format. INPUTFORMAT NAME "postgis" DRIVER "OGR/PostgreSQL" OPTIONS "PGSQL_HOST=localhost" "PGSQL_PORT=5432" "PGSQL_USER=mapserver" "PGSQL_PASSWORD=mapserver" "PGSQL_DBNAME=mapserver" END # Set the map projection. PROJECTION EPSG:4326 END # Create a layer for the red line. LAYER NAME "red_line" TYPE LINE DATA "the_geom from my_table" STATUS ON LABELCACHE ON CLASS NAME "Red Line" COLOR 255 0 0 WIDTH 1 END END # Create a map. MAP NAME "my_map" STATUS ON EXTENT -180 -90 180 90 LAYERS "red_line" END END
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.