Hexagon Geospatial
MENU

Support ERDAS APOLLO

Wondering how others have configured their ERDAS APOLLO server or what data they are crawling? The ERDAS APOLLO Discussion board is a place to find information, share ideas and more. Join the community, connect, contribute and share.
Showing results for 
Search instead for 
Do you mean 
Reply
Occasional Contributor
Posts: 15
Registered: ‎05-11-2017

How to define scale ranges for WMS/WFS

Hi all,

 

I am using Apollo Advantage 2018 and I have created a few vector services.

I am using Vector Service Style Editor for data styling.

 

Is there any way to define scale ranges for layers in service?

In Style Editor there is part related to scale ranges, but scale ranges defined there are applied only to map window in Style Editor.

 

Regards,

Micko

 

Staff
Posts: 110
Registered: ‎05-31-2016

Re: How to define scale ranges for WMS/WFS

I add scale ranges by adding MapGen sections to my Mapping file.

Here is a link to the documentation https://hexagongeospatial.fluidtopics.net/reader/JmIvzN0qCQzgtWYtOP2PvQ/rHJB40vI1oLBm_6b5z0CZA

 

Example from the documentation:

 

<Mapping>
 <SQL name="wfs:CITY">
  <Primary name="ID" nameSQL="ID" />
  [...]
  <Element name="ADMIN_LEVEL" nameSQL="LEVEL" />
  <Element name="POPULATION" nameSQL="POP" />
  <Element name="ECOSTAT" nameSQL="STAT" />
  <Element name="Boundary" nameSQL="BOUNDARY" />
  <!-- another geometric column exists, named CENTER, for the city center point -->

  <MapGen scaleMin="1000000">
   <Field name="Boundary">CENTER</Field/>
   <Where>ADMIN_LEVEL>4</Where>
  </MapGen>

  <MapGen scaleMax="1000000" scaleMin="100000">
   <Field name="Boundary"/>
   <Where>ADMIN_LEVEL=4</Where>
  </MapGen>

  <MapGen scaleMax="100000">
   <Field name="Boundary"/>
   <Where>ADMIN_LEVEL<4</Where>
  </MapGen>

 </SQL>
<Mapping>
Staff
Posts: 110
Registered: ‎05-31-2016

Re: How to define scale ranges for WMS/WFS

And if you want to set style scale ranges on data using the data manager style editor you just create the styles and set the Displayable value to use an expression.

Something like 

IF(DISPLAYSCALE()<300000, TRUE(), FALSE())

 

Capture.JPG

Highlighted
Occasional Contributor
Posts: 15
Registered: ‎05-11-2017

Re: How to define scale ranges for WMS/WFS

Hi phudson,

 

Thanks a lot for tips.

First option works well. It's not exactly what I thought, but it works.

 

I have parcels for complete region and I wanted to limit display scale up to 15000 and for smaller scale to provide information that data is not available in current scale.

 

With MapGen I allowed to display only big parcels .

 

	  <MapGen scaleMin="1" scaleMax="15000" >
	  <Field name="geom"/>
	  </MapGen>
	  
	  <MapGen scaleMin="15001" scaleMax="30000" >
	  <Field name="area"/>
	  <Field name="geom"/>
	  <Where>area>75000</Where>
	  </MapGen>

	  <MapGen scaleMin="30001" scaleMax="1000000000" >
	  <Field name="area"/>
	  <Field name="geom"/>
	  <Where>area>300000</Where>
	  </MapGen>

 

It is not posssible to use tip from your second message. For vector services it is not possible to open data manager style editor to add or edit styles.

addstyle.PNG

Regards

 

 

Do you need immediate support?
If you encounter a critical issue and need immediate assistance please submit a Service Request through our Support Portal.