Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docker/cfg/addresses.properties
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,9 @@ getfeatures.limit.max=10000

# Configure known srids (hakunapi will always add 84 (lon, lat) and 4326 (lat, lon))
srid=3067,4258,3903,10774
# Let hakunapi know that EPSG:4258 is lat,lon order
# Let hakunapi know that EPSG:4258 is lat,lon order (+ degrees)
srid.4258.latLon=true
srid.4258.degrees=true
# EPSG:3067 is east,north order (projected)
srid.3067.latLon=false
srid.3067.proj4=+proj=utm +zone=35 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs
Expand Down
12 changes: 11 additions & 1 deletion docker/cfg/addresses_gpkg.properties
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,24 @@ servers.dev.description=Development server

# API level configuration
formats=json,html,gpkg
formats.html.type=html
# HTML tile layer configuration per SRID
formats.html.3067.tileUrl=https://avoin-karttakuva.maanmittauslaitos.fi/avoin/wmts/1.0.0/taustakartta/default/ETRS-TM35FIN/{z}/{y}/{x}.png?api-key=7cd2ddae-9f2e-481c-99d0-404e7bc7a0b2
formats.html.3067.tileAttribution=&copy; <a href="https://www.nls.fi">National Land Survey of Finland</a>
formats.html.3067.tileOriginX=-548576
formats.html.3067.tileOriginY=8388608
formats.gpkg.dir=/app/features_addresses/tmp
getfeatures.limit.default=10
getfeatures.limit.max=10000

# Configure known srids (hakunapi will always add 84 (lon, lat) and 4326 (lat, lon))
srid=3067,4258
# Let hakunapi know that EPSG:4258 is lat,lon order
# EPSG:3067 is east,north order (projected)
srid.3067.latLon=false
srid.3067.proj4=+proj=utm +zone=35 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs
# Let hakunapi know that EPSG:4258 is lat,lon order (+ degrees)
srid.4258.latLon=true
srid.4258.degrees=true

# Instead of loading PostGIS source drivers (the default) allow and load only GpkgSimpleSource
db.classes=fi.nls.hakunapi.source.gpkg.GpkgSimpleSource
Expand Down
3 changes: 2 additions & 1 deletion examples/finnish_addresses/cfg/addresses.properties
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,9 @@ getfeatures.limit.max=10000

# Configure known srids (hakunapi will always add 84 (lon, lat) and 4326 (lat, lon))
srid=3067,4258,3903,10774
# Let hakunapi know that EPSG:4258 is lat,lon order
# Let hakunapi know that EPSG:4258 is lat,lon order (+ degrees)
srid.4258.latLon=true
srid.4258.degrees=true
# EPSG:3067 is east,north order (projected)
srid.3067.latLon=false
srid.3067.proj4=+proj=utm +zone=35 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs
Expand Down
12 changes: 11 additions & 1 deletion examples/finnish_addresses/cfg/addresses_gpkg.properties
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,24 @@ servers.dev.description=Development server

# API level configuration
formats=json,html,gpkg
formats.html.type=html
# HTML tile layer configuration per SRID
formats.html.3067.tileUrl=https://avoin-karttakuva.maanmittauslaitos.fi/avoin/wmts/1.0.0/taustakartta/default/ETRS-TM35FIN/{z}/{y}/{x}.png?api-key=7cd2ddae-9f2e-481c-99d0-404e7bc7a0b2
formats.html.3067.tileAttribution=&copy; <a href="https://www.nls.fi">National Land Survey of Finland</a>
formats.html.3067.tileOriginX=-548576
formats.html.3067.tileOriginY=8388608
formats.gpkg.dir=/app/features_addresses/tmp
getfeatures.limit.default=10
getfeatures.limit.max=10000

# Configure known srids (hakunapi will always add 84 (lon, lat) and 4326 (lat, lon))
srid=3067,4258
# Let hakunapi know that EPSG:4258 is lat,lon order
# EPSG:3067 is east,north order (projected)
srid.3067.latLon=false
srid.3067.proj4=+proj=utm +zone=35 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs
# Let hakunapi know that EPSG:4258 is lat,lon order (+ degrees)
srid.4258.latLon=true
srid.4258.degrees=true

# Instead of loading PostGIS source drivers (the default) allow and load only GpkgSimpleSource
db.classes=fi.nls.hakunapi.source.gpkg.GpkgSimpleSource
Expand Down
5 changes: 5 additions & 0 deletions examples/finnish_admin_units/administrative_areas.properties
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ servers.dev.description=Development server
formats=json,html,csv
formats.json.type=json
formats.html.type=html
# HTML tile layer configuration per SRID
formats.html.3067.tileUrl=https://avoin-karttakuva.maanmittauslaitos.fi/avoin/wmts/1.0.0/taustakartta/default/ETRS-TM35FIN/{z}/{y}/{x}.png?api-key=7cd2ddae-9f2e-481c-99d0-404e7bc7a0b2
formats.html.3067.tileAttribution=&copy; <a href="https://www.nls.fi">National Land Survey of Finland</a>
formats.html.3067.tileOriginX=-548576
formats.html.3067.tileOriginY=8388608
formats.csv.type=csv
#formats.geojson.forceLonLat=true
getfeatures.limit.default=1000
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ public class PropertiesCRSRegistry implements CRSRegistry {

@Override
public SRIDCode detect(Properties config, int srid) {
if (SRIDCode.isKnown(srid)) {
return SRIDCode.getKnown(srid);
}
String latLonStr = config.getProperty("srid." + srid + ".latLon", "false");
String degreesStr = config.getProperty("srid." + srid + ".degrees", "false");
String dimensionStr = config.getProperty("srid." + srid + ".geometryDimension", "XY");
Expand Down
Loading