0

Following up on QGIS: multiple map measurements I want to use a style to convert a kml layer to have measurements on all size, kind of like:

enter image description here

I'm using QGIS 3.28 LTE. I started by downloading the style from https://plugins.qgis.org/styles/21/ which is a zip file. I extracted the contained xml file and uploaded it using the setting -> style manager option

If I look in the style manager I now have:

enter image description here

I've installed the KML tools plugin and used this to create a polygon layer from the kml layer . Next I double clicked on the output polygon label , and added the " Measure feet " Label.

However when I look at the polygon layer, I see:

enter image description here

The KML file:

<?xml version="1.0" encoding="utf-8" ?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<Document id="root_doc">
<Schema name="2963760840" id="2963760840">
    <SimpleField name="timestamp" type="string"></SimpleField>
    <SimpleField name="begin" type="string"></SimpleField>
    <SimpleField name="end" type="string"></SimpleField>
    <SimpleField name="altitudeMode" type="string"></SimpleField>
    <SimpleField name="tessellate" type="int"></SimpleField>
    <SimpleField name="extrude" type="int"></SimpleField>
    <SimpleField name="visibility" type="int"></SimpleField>
    <SimpleField name="drawOrder" type="int"></SimpleField>
    <SimpleField name="icon" type="string"></SimpleField>
</Schema>
<Folder><name>2963760840</name>
<Placemark>
    <Style><LineStyle><color>ff0000ff</color></LineStyle><PolyStyle><fill>0</fill></PolyStyle></Style>
    <ExtendedData><SchemaData schemaUrl="#2963760840">
        <SimpleData name="tessellate">-1</SimpleData>
        <SimpleData name="extrude">0</SimpleData>
        <SimpleData name="visibility">-1</SimpleData>
    </SchemaData></ExtendedData>
    <Polygon><outerBoundaryIs><LinearRing><coordinates>-88.4317405175818,31.6558800962605 -88.431737410907,31.6559161822374 -88.4317340478576,31.6559522520483 -88.4317304294607,31.65598830298 -88.4317265546618,31.6560243350402 -88.4317224234424,31.6560603464253 -88.4317180368385,31.656096335324 -88.4317133937868,31.6561323008421 -88.4317084963772,31.6561682411606 -88.4317033435555,31.6562041562871 -88.4316979352941,31.6562400435163 -88.4316922726381,31.6562759019385 -88.4316863545151,31.6563117297579 -88.4316801819788,31.6563475269666 -88.4316737560565,31.6563832908516 -88.4316670756934,31.6564190214205 -88.4316601419166,31.6564547159601 -88.4316529536625,31.6564903735763 -88.4316455130305,31.6565259933519 -88.431637818957,31.6565615743927 -88.4316298724689,31.6565971139855 -88.431621673566,31.6566326121303 -88.4316132232843,31.6566680670158 -88.4316045205513,31.6567034768459 -88.4315955664119,31.6567388407112 -88.431586360857,31.6567741577097 -88.4315817286416,31.6567915607419 -88.4311466897599,31.6584809674529 -88.4311356263598,31.658529215528 -88.431124815372,31.6585775059521 -88.431114256788,31.6586258378234 -88.4311039516355,31.658674208429 -88.4310938999238,31.6587226186706 -88.4310841005811,31.6587710667524 -88.431074554662,31.6588195526667 -88.4310652631943,31.6588680737005 -88.4310562240697,31.6589166298692 -88.4310474404426,31.6589652202479 -88.4310389101867,31.6590138430485 -88.4310306343658,31.6590624991651 -88.4310226129532,31.6591111858924 -88.4310148459404,31.6591599023285 -88.4310073343821,31.6592086484659 -88.4310000772153,31.6592574234104 -88.4309930754678,31.6593062244489 -88.430986329149,31.6593550524834 -88.4309798382413,31.6594039057101 -88.4309736027451,31.6594527841292 -88.4309720419662,31.6594653415 -88.4309644366008,31.6595394733955 -88.4309570876343,31.6596136241626 -88.4309499950584,31.6596877928994 -88.4309431588736,31.659761979606 -88.4309365790716,31.6598361833805 -88.4309302545895,31.6599104033289 -88.4309241875368,31.6599846394358 -88.4309183768417,31.6600588899053 -88.4309128225048,31.6601331547375 -88.4309075245268,31.6602074339324 -88.4309024839445,31.6602817256786 -88.4308976996953,31.6603560290821 -88.4308931717888,31.6604303450447 -88.4308889012709,31.660504672657 -88.43088488707,31.6605790101229 -88.4308831265363,31.6606132013205 -88.430880160709,31.6606753008115 -88.4308774511835,31.6607374083529 -88.4308749990237,31.6607995248388 -88.4308728042029,31.6608616475637 -88.4308708656675,31.6609237765354 -88.4308691844632,31.6609859108443 -88.4308677605907,31.6610480504906 -88.4308665929691,31.6611101927763 -88.4308656826711,31.6611723394975 -88.4308650296705,31.6612344879487 -88.430864901764,31.6612506351474 -88.4326782034786,31.6612204116202 -88.432897502907,31.6542440681409 -88.4317454858576,31.6541186481987 -88.4317646239949,31.6548099837846 -88.431765521614,31.65484436124 -88.4317663085529,31.6548787413071 -88.4317669858568,31.6549131230762 -88.4317675535255,31.6549475065475 -88.4322256604991,31.6549477172071 -88.4321986103415,31.6558080866836 -88.4317459607727,31.6558078776201 -88.4317433668281,31.6558439941254 -88.4317405175818,31.6558800962605</coordinates></LinearRing></outerBoundaryIs></Polygon>
</Placemark>
</Folder>
</Document></kml>

I don't see any measurements. What am I doing wrong?

Edit1: Regarding: "Select a projected CRS with feet as unit (as we don't know where in the world is your area of interest we can't suggest any, if you have other data in the same area that use a projected CRS in feet you are probably safe using the same…)" -

I'm working in Alabama, but the crs systems from there use meters. At random I picked 1 from New Mexico which had feet as the units. Does this matter?

enter image description here

enter image description here

I'm not sure what to do here.

4
  • What CRS is your layer in - does it use feet for units? If it's in WGS84 (EPSG:4326) or Web Mercator (EPSG:3857) the measurements will not show up if you use the Measure Feet symbol, due to a data-defined override in the font marker component of the symbol (which shows the measurements). Use the Measure Meters symbol for meter-based CRS. If your layer uses degrees for units change it to an appropriate projected CRS. Your symbol preview in Style Manager looks weird too, but I downloaded the .xml fresh and used it on QGIS 3.28.15 with no problems.,..
    – she_weeds
    Commented Feb 28 at 5:23
  • @she_weeds, I am using WGS84 and my base unit for the layer is feet. How do I get this working with feet? Commented Mar 1 at 3:28
  • To clarify, the project CRS is WGS84 (EPSG:4326 - which uses degrees as units) and the layer CRS is something else (definitely using feet as units in Layer Properties > Information > Coordinate Reference System > Units)? I still seem to be able to get that to work on QGIS with the Measure Feet symbol... Can you try deleting the symbol and re-importing it from the xml? It doesn't seem right.. Please also be aware though if you use the Measure tool in a WGS84 project you'll get a different result than the measurement on a feet-based layer
    – she_weeds
    Commented Mar 1 at 4:11
  • @she_weeds , I've added the kml file contents to the question. Can you get this to work for you? Commented Mar 1 at 16:59

1 Answer 1

2

These style are designed to not show any measurement if the the layer unit is not in meter or feet (depending on the style you use). As you use KML you are in necessarily in degree so it won't work.

You need to export your data in another format (as KML can only be in degree) and reproject it in projected CSR suitable for measurement in feet in your area. You can do both in a single operation :

Right click on your layer an choose Export>Save Feature As... then in the window that open:

  • Choose your export format (if you don't know or don't have a favorite the default GeoPackage is a good choice)
  • Click on the three dot right to the "file name" input and select a location and name to save your new layer
  • Select a projected CRS with feet as unit (as we don't know where in the world is your area of interest we can't suggest any, if you have other data in the same area that use a projected CRS in feet you are probably safe using the same…)
  • Let all other option as default (you may check the "Add saved file to map" at the bottom to automatically load the reprojected layer) and click OK
  • Style your new layer using using the "Measure Feet" symbol
3
  • please see edit above Commented Mar 4 at 21:27
  • @user1592380 as crs try epsg.io/102629 or epsg.io/102630 depending on exact location. Set the layer crs and the project crs to the same
    – J.R
    Commented Mar 4 at 21:59
  • Thank you @J.R, you got it working! Commented Mar 4 at 22:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.