-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scale rules in EGDI #570
Comments
In the mapserver configuration file try adding:
|
I don't think there's an easy way to do it. In a mapserver configuration where I had full control, I would create two (or more depending on scales) layers from the single data source using an appropriate query, and give each layer the required scale range. Then I would group the layers, and show the grouped layer in the map. |
I managed to query & show only scalefrom 4, but still unsure how to create multiple layers from the same dataset? |
You can use a Like:
|
Sorry, I didn't explain well before. This is what I did, and works for one combination of scalefrom/to However, I don't know how to then create the other layers to show the other scale combinations. I tried duplicating the whole LAYER code and changing the query in the second one to another scale combination, but it didn't work. This second step is what I need some help with. |
can you post both full config files |
Sorry I'm not sure what config files are, the mapserver code? Or the actual geopackage file? |
The mapserver code. |
|
For grouping to work would need something like:
|
So I should create a copy of the dataset for every scaleFrom/scaleTo combination I have, then list them with the corresponding rules, one LAYER after the other? |
That is I think the only way to do it. Would work with or without grouping (that is assigning all the layers to a group); grouping would be neater, but I'm not sure if the configuration editor will allow it. |
I cannot make it work :( I also tried Union Layer and no luck:
|
Your layers don't have min and max scale denominators in them. When you say doesn't work, do you mean none of the layers are showing at all? |
can you click through the advanced button and see if there is an error reported, may have to view frame source |
HIKE have solved the issue of scale layering for their data, as shown in the following map: They have three layers (VIEWS in a single GeoPackage) hike_detail, hike_overview , hike_polygons each with a style (SLD) that includes MinScaleDenominator and MaxScaleDenominator as: For hike_polygons
For hike_detail
For hike_overview
They use default connection details in the mapfile for example:
|
@renatabarros not sure if this is a solution for you considering your previous issue (#469 ), others may know different |
Thank you very much James for all the help these days! I'll have a call with Rob tomorrow to see if I can achieve a similar solution for our data, and will keep you posted. |
Hope you can solve it with SLD. As you say you have more than two combinations, I think you have 26 as below, in case you haven't already worked it out:
|
Hi James, an update on this issue: I have decided to split the results of each area of interest into two views "overview" and "detail" depending on the scaleFrom set by the partners (similarly to HIKE), and duplicate the layers in a way that the correct view is displayed in the right scale range. Far from ideal but I didn't manage to correctly set up the views within the geopackage. But for this to work properly, one thing I didn't manage to do yet is to set layers as always on as HIKE did. I have STATUS DEFAULT in all of them, and changed Default YES in the couplings, but still I need to select them on the map (however selecting any layer turns all others on). Any fix to this? |
Thanks for the answer, James. I did this for all layers but on the map (running from the coupling) I need to select at least one manually for all of them to appear. However I just saw that the map embedded on the project's web page updates properly, so all good! |
Hello all (again),
One last thing missing to properly display GeoConnect³d data are the scale rules. Every object in our geopackages has an assigned scaleFrom and scaleTo (as 2 attributes) where it should appear/disappear from the web viewer. This is also something HIKE is doing for their faults as far as I know. However, I didn't find any tips for the code to create such rules. Could you help me out? Thanks in advance.
A more concrete example using the dataset gsi_geom.
These are the attributes within the shp:
Therefore these points should appear at scale 1:2,000,000 and disappear at scale 1:25,000 in the viewer.
And these are the scale steps we share with HIKE:
The text was updated successfully, but these errors were encountered: