Comments (5)
This seems a useful enhancement to me. From https://mapserver.org/mapfile/template.html#general
nullformat = String to output if the attribute value is NULL, empty or doesn’t match the pattern (if defined). If not set and any of these conditions occur the item tag is replaced with an empty string.
So nullformat
is already used for a couple of cases - both NULL values and values that don't meet a regex, so could be expanded to missing fields. The downside would be possibly breaking backwards compatibility with current templates - although as noted in this issue if a field is missing the template would be throwing an error.
from mapserver.
Implemented with #7017 and docs at MapServer/MapServer-documentation#873
from mapserver.
This seems a useful enhancement to me. From https://mapserver.org/mapfile/template.html#general
nullformat = String to output if the attribute value is NULL, empty or doesn’t match the pattern (if defined). If not set and any of these conditions occur the item tag is replaced with an empty string.
So
nullformat
is already used for a couple of cases - both NULL values and values that don't meet a regex, so could be expanded to missing fields. The downside would be possibly breaking backwards compatibility with current templates - although as noted in this issue if a field is missing the template would be throwing an error.
Perhaps setting an item-level attribute to ignore a missing item - potentially paired with the nullformat - would be a way to avoid backwards compatibility issues.
from mapserver.
Perhaps setting an item-level attribute to ignore a missing item - potentially paired with the nullformat - would be a way to avoid backwards compatibility issues.
@sdlime - sounds good to me. What about an ignoremissing
property, which can take a "true"
value, to ignore missing fields, and if the field is missing it populates the template with the nullformat
value e.g.
<!-- MapServer Template -->
Band 1: [value_0]<br/>
[item name="value_1" format="Band 2: $value" nullformat="" ignoremissing="true"]<br/>
from mapserver.
Yeah, that's what I was thinking. I can't think of a more concise name...
from mapserver.
Related Issues (20)
- Whitespace in EXPRESSIONS added to SLD Filters
- Antimeridian BBOXes not supported by the OGC Features API
- Failing Windows CI Test test_rq_10 HOT 5
- Authentication of users and access to data based on S3 keys provided through Run-time Substitution. HOT 3
- PHPScript HOT 2
- Using LAYER CLASS filters for MVT tiles rendering HOT 6
- Segfault when Mapfile includes a missing file HOT 3
- data loss on getmap requests when vector data is reprojected EPSG:2056 to EPSG:4326 HOT 4
- In under certain conditions Mapserver segfault error geos_ts_c.cpp HOT 2
- Posgresql returns in response all products in database, even if BBOX parameter is passed
- undefined symbol: msCGIWriteLog when calling any mapserver command HOT 2
- Web metadata ows_schemas_location is not respected for OGC API Features, and appears to not be documented HOT 3
- Memory corruption in msUpdate...FromString
- Parser IO error is ignored if map include is a directory
- msRedactCredentials removes too much content especially for postgis connections HOT 4
- Mapserver unable to read config file HOT 2
- erroneous extra outlines when using WIDTH based on an attribute HOT 4
- centerline function causes GEOS errors HOT 8
- `msOGRFileOpen: Spatialite support in GPKG not enabled` with LogLevel `DEBUG 0` HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mapserver.