Developer Discussions

Discuss topics with other Hexagon Geospatial Power Portfolio developers and experts to get the most out of our products.
Showing results for 
Search instead for 
Do you mean 
Reply
Highlighted
Regular Contributor
Posts: 253
Registered: ‎05-01-2016
Accepted Solution

Displaying areas in acres and projection coordinates in survey feet using icons in gwmpub.aspx

[ Edited ]

I have a webmap publisher project i've added to my GeoSpatial Portal SDK project as a service source.  I would like the area icon to display areas in acres and projection coordinates in survey feet.  I have the imperial units of ac and survey_ft added to my web.config file as suggested by support:

 


<ui dblClickTimeout="400" settingsRequireConfirmation="false" systemOfMeasurement="imperial" enabledUnits="m, km, ft, survey_ft, yd, mi, m2, km2, yd2, ft2, mi2, are, ha, ac">

 


The workspace projection of the publisher project has the correct units set and i have a csf file in my Webmap Publisher Projects  Connection folder with the same settings.  Right now, areas are being displayed in miles and coordinates in meters.  

 

The Settings panel shows that Imperial is the System of Measurement.

All of the products being used are the first service pack of 2016 - GeoMedia 2016 ep01, Web Map Essentials 2016 ep01 and SDK 2016 ep01.

 

Highlighted
Anonymous
Posts: 0

Re: Displaying areas in acres and projection coordinates in survey feet using icons in gwmpub.aspx

Hi,

 

First off, I'm not sure that survey_ft is supported yet for measurements in a Portal Application.  A CR-Ehancement could be logged to add support for that unit type. The supported units are (from the fluidtopics online documentation):

 

Available units are:

For linear measurements:

  • m
  • km
  • ft
  • yd
  • mi

For areal measurements:

  • m2
  • km2
  • ft2
  • yd2
  • mi2
  • are
  • ha
  • acre

 

This is what worked for me.  Created a new v 2016, EP01, Publisher Portal application so now I have a Portal application and a WMPS application.  Edited the Web.Config of the Portal application and set the enabledunits element tag as so:

 

<ui dblClickTimeout="400" settingsRequireConfirmation="true" systemOfMeasurement="imperial" enabledUnits="ft, ft2, acre">

 

Then I went to IIS Manager and restarted IIS.  When a change is made in a Web.Config file, IIS must be reset in order to "see" the change.  You can also open a command prompt window and key-in the command of:   iisreset.   There probably is another, easier way to do this, but this workflow does work successfully.

 

Then I opened the portal application and displayed the WMPS MapWindow1.  I then did an Area measurement creating a rectangular area with 4 points and the distance on the lines is show in ft, and the area of the rectangle is shown in acres. 

 

In your case, be sure you have lower case for the word "imperial" and then try with just the units you want omitting survey_ft. I also set the settingsRequireConfirmation parameter to "true" because in my intial testing on version 2015, the desired units were not displayed until I changed that value from "false" to "true". 

 

Please try these changes on your end in the Web.Config file of the Portal application, reset IIS, and then retest the measurements to see if the values of ft and acres are displaying. 

 

Hope this helps.

 

Kind Regards,

 

Carolyn

 

 

Highlighted
Regular Contributor
Posts: 253
Registered: ‎05-01-2016

Re: Displaying areas in acres and projection coordinates in survey feet using icons in gwmpub.aspx

[ Edited ]

Thank you so much Carolyn!  I tried it and it worked immediately for "Measure area" - i get measurements in ft as I placed the polygon and then the area is displayed in acres.  When i do a "Show Coordinates" though, i am still getting meters.  I did remove survey_ft from my list of units - i had thought i would try augmenting the list and see if it worked.  I am using EPSG 3436 

 

PROJCS["NAD83 / Illinois West (ftUS)",
GEOGCS["GCS_North_American_1983",
DATUM["D_North_American_1983",
SPHEROID["GRS_1980",6378137,298.257222101]],
PRIMEM["Greenwich",0],
UNIT["Degree",0.017453292519943295]],
PROJECTION["Transverse_Mercator"],
PARAMETER["latitude_of_origin",36.66666666666666],
PARAMETER["central_meridian",-90.16666666666667],
PARAMETER["scale_factor",0.999941177],
PARAMETER["false_easting",2296583.333300001],
PARAMETER["false_northing",0],
UNIT["Foot_US",0.30480060960121924]]
Highlighted
Anonymous
Posts: 0

Re: Displaying areas in acres and projection coordinates in survey feet using icons in gwmpub.aspx

Hi,

 

I do not have enough information nor documentation to know what to expect with the units for Show Coordinate readouts.  In the online documentation,  it states:

 

"Use this command to display the coordinates of a pointed location on the map. The coordinates are displayed next to the selected point on the map and are displayed in the specified projection units if you use a projected coordinate system, or in geographic units if you use a geographic coordinate system."

 

So, I am not sure what this means exactly for a projected coordinate system.  Is the Portal application defined to always output Meters for Easting/Northings or is it configurable somewhere or is it dependent on the .csf units defined for Projection readouts, or is it dependent on the Portal CRS Config xml file unit for the specific projection?  So far, I have not found anything definite. I am continuing testing to see if I can get the output coordinate units displayed as you need.

 

Development needs to provide a reply as to exactly what to expect; otherwise, I suggest you do go ahead and log a Service Request on the Show Coordinates command.

  

Kind Regards,

 

Carolyn

Highlighted
Technical Evangelist
Posts: 1,307
Registered: ‎09-11-2015

Re: Displaying areas in acres and projection coordinates in survey feet using icons in gwmpub.aspx

[ Edited ]

Hi,

 

I believe that this should be logged as possible bug. The Show Coordinates command clearly declares that "the coordinates are displayed next to the selected point on the map and are displayed in the specified projection units if you use a projected coordinate system".

 

But this is not true from my tests. No matter which type of projection I select this command will always show results in metres.

 

For example I tried those two CRSes:

<code name="NAD83(NSRS2007) / Illinois East" value="EPSG:3528">
...some definition...
<isGeographic>false</isGeographic>
<unit>
  <name>metre</name>
  <value>1</value>
</unit>
</code>
<code name="NAD83 / Illinois West (ftUS)" value="EPSG:3436">
...some definition...
<isGeographic>false</isGeographic>
<unit>
  <name>US survey foot</name>
  <value>0.304800609601219</value>
</unit>
</code>

Publisher:

Untitled.png

 

Please fill an SR.

 

Thanks,

Jan

Jan Neumann
Post Sales Engineer Web Applications
Hexagon Geospatial

Highlighted
Technical Evangelist
Posts: 1,307
Registered: ‎09-11-2015

Re: Displaying areas in acres and projection coordinates in survey feet using icons in gwmpub.aspx

I've also tried playing around with the Proj4 attributes in the CRSConfig file but no luck, Portal still uses metres.

 

<!-- Original -->
<attributes>+proj=tmerc +lat_0=36.66666666666666 +lon_0=-90.16666666666667 
+k=0.999941177 +x_0=699999.9999898402 +y_0=0 +ellps=GRS80 
+datum=NAD83 +to_meter=0.3048006096012192 +no_defs</attributes>

<!--  vs. -->
<attributes>+proj=tmerc +lat_0=36.66666666666666 +lon_0=-90.16666666666667 
+k=0.999941177 +x_0=699999.9999898402 +y_0=0 +ellps=GRS80 
+datum=NAD83 +no_defs +units=us-ft</attributes>

<!--  vs. -->
<attributes>+proj=tmerc +lat_0=36.66666666666666 +lon_0=-90.16666666666667 
+k=0.999941177 +x_0=699999.9999898402 +y_0=0 +ellps=GRS80 
+datum=NAD83 +to_meter=0.3048006096012192 +no_defs +units=us-ft</attributes>
Jan Neumann
Post Sales Engineer Web Applications
Hexagon Geospatial