[MapServer-dev] Suggestion - downloading a map file from the database, atomic logs and etc.

Jeff McKenna jmckenna at gatewaygeomatics.com
Mon Jul 24 04:14:56 PDT 2023


It would be great if your "loading a mapfile from the database" function 
is exposed through MapScript also.

-jeff



-- 
Jeff McKenna
GatewayGeo: Developers of MS4W, MapServer Consulting and Training
co-founder of FOSS4G
http://gatewaygeo.com/




On 2023-07-24 7:42 a.m., Nikolay Sukhno via MapServer-dev wrote:
> Hello, sorry if i'm posting in the wrong place
> 
> In our company, we have made some modifications to the mapserver, and 
> would like to offer this functionality.
> 
> Will the community be interested in the following modifications?
> 
> 1. The function of loading a mapfile from the database (we have it postgres)
> 
> mappostgis.cpp::msPostGisLoadTextFileFromDb
> 
> This is controlled by two config parameters, like
> 
> MS_MAP_FROM_DB_CONN "host=127.0.0.1 port=5432 dbname=postgres_mapserv 
> user=*** password=***"
> 
> MS_MAP_FROM_DB_SQL "select x.mapfile from mta_mapserv x where …"
> 
> We did it because mapfiles are generated automatically. It is also 
> faster than reading from disk, and this is visibly on large mapfiles.
> 
> 2. Atomic logging of the function msDebug. We have implemented through Mutex
> 
> It helps a lot when testing, when several threads write to one file, the 
> lines are confused.
> 
> 3. Logging the layer name for various errors.
> 
> This helps us a lot to find errors in the mapfile in real user experience.
> 
> 


More information about the MapServer-dev mailing list