gpt-3.5-turbo-0613· OpenAI
Arena Human Preference 55K
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
Sure! Here's an example of a MapServer script that will draw a red line using data from a PostgreSQL table:
MAP NAME "Red Line Example" SIZE 800 600 IMAGECOLOR 255 255 255 IMAGETYPE png PROJECTION "init=epsg:4326" END LAYER NAME "Red Line" TYPE LINE STATUS ON DATA "geom from (SELECT * FROM your_table) as subquery using unique gid using srid=4326" LABELITEM "name" CLASS STYLE COLOR 255 0 0 WIDTH 2 END END END ENDMake sure to replace
your_tablewith the actual name of your PostgreSQL table. Also, adjust theSIZEandIMAGETYPEparameters as needed.Save the script with a
.mapextension (e.g.,red_line.map), and then you can use it with MapServer to generate a map image.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.