[{"data":1,"prerenderedAt":552},["ShallowReactive",2],{"Categories":3,"NavIndexCategoriesCountFooter":207,"content-\u002F2026\u002F07\u002F17\u002Fdepth-curves-for-the-lakes-of-the-halden-river-system":208},[4,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,68,70,71,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206],{"category":5},"System Administration",{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":27},"Software Development",{"category":5},{"category":5},{"category":5},{"category":5},{"category":27},{"category":27},{"category":5},{"category":5},{"category":5},{"category":27},{"category":5},{"category":5},{"category":5},{"category":27},{"category":27},{"category":27},{"category":27},{"category":5},{"category":5},{"category":5},{"category":27},{"category":27},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":27},{"category":5},{"category":5},{"category":27},{"category":27},{"category":27},{"category":27},{"category":5},{"category":27},{"category":27},{"category":67},"Drones & RC",{"category":69},"DIY Projects",{"category":67},{"category":72},"Photography",{"category":69},{"category":69},{"category":69},{"category":67},{"category":69},{"category":69},{"category":69},{"category":69},{"category":69},{"category":69},{"category":69},{"category":69},{"category":69},{"category":69},{"category":69},{"category":69},{"category":69},{"category":69},{"category":67},{"category":69},{"category":69},{"category":67},{"category":67},{"category":72},{"category":72},{"category":72},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":5},{"category":5},{"category":72},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":5},{"category":67},{"category":67},{"category":72},{"category":72},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":72},{"category":67},{"category":138},"3D Printing - Laser Cutting - CNC",{"category":138},{"category":138},{"category":138},{"category":138},{"category":138},{"category":138},{"category":138},{"category":138},{"category":138},{"category":138},{"category":138},{"category":5},{"category":138},{"category":27},{"category":27},{"category":138},{"category":138},{"category":72},{"category":158},"Photography,3D Printing - Laser Cutting - CNC",{"category":27},{"category":27},{"category":69},{"category":27},{"category":27},{"category":27},{"category":27},{"category":5},{"category":67},{"category":5},{"category":5},{"category":27},{"category":27},{"category":27},{"category":27},{"category":27},{"category":69},{"category":27},{"category":27},{"category":27},{"category":67},{"category":27},{"category":182},"Home Assistant",{"category":182},{"category":72},{"category":27},{"category":27},{"category":72},{"category":138},{"category":5},{"category":72},{"category":72},{"category":138},{"category":27},{"category":182},{"category":5},{"category":182},{"category":72},{"category":72},{"category":72},{"category":72},{"category":72},{"category":72},{"category":72},{"category":72},{"category":72},{"category":27},195,{"id":209,"title":210,"body":211,"category":534,"date":535,"description":536,"embedImage":534,"extension":537,"image":523,"intro":538,"meta":539,"navigation":540,"path":541,"seo":542,"series":534,"sitemap":543,"stem":544,"tags":545,"__hash__":551},"content\u002F2026\u002F07\u002F17\u002Fdepth-curves-for-the-lakes-of-the-halden-river-system.md","Depth curves for the lakes of the Halden river system",{"type":212,"value":213,"toc":527},"minimark",[214,234,250,253,256,265,270,273,276,287,298,301,305,316,319,325,328,331,335,338,344,355,359,362,510,513,517,524],[215,216,217,227,228,233],"p",{},[218,219,226],"a",{"href":220,"rel":221,"target":225},"https:\u002F\u002Fwww.nve.no\u002F",[222,223,224],"nofollow","noopener","noreferer","_blank","NVE"," have a lot of data available via ",[218,229,232],{"href":230,"rel":231,"target":225},"https:\u002F\u002Fatlas.nve.no",[222,223,224],"atlas",".",[215,235,236,237,241,242,245,246,249],{},"Under the beta area (",[238,239,240],"em",{},"Tema (beta)",") is the water area (",[238,243,244],{},"Tema vann",") with access to the inland lakes database (",[238,247,248],{},"innsjødatabase",").",[215,251,252],{},"Amongst other things - this has depth points and curves for most of the lakes in the system of lakes and rivers here in Halden.",[215,254,255],{},"I wanted to have this data available to me while on the lakes - and preferably in an offline format.",[215,257,258,259,264],{},"I already had several mapping apps - and some have support for geojson data. In this instance I decided to use ",[218,260,263],{"href":261,"rel":262,"target":225},"https:\u002F\u002Fgurumaps.app\u002F",[222,223,224],"Guru Maps",". This can have up to 3 offline maps in the free version - but - importantly for this use case - it also supports geojson and mapcss too.",[266,267,269],"h2",{"id":268},"retrieval","Retrieval",[215,271,272],{},"So - the data in innsjødatabase is available and can be queried. Each lake has a water ID (vatnlnr) - which you can see by clicking on the atlas map.",[215,274,275],{},"For example - depth curves for Femsjøen which is 316:",[277,278,283],"pre",{"className":279,"code":281,"language":282},[280],"language-text","curl -o depth_curves.json 'https:\u002F\u002Fkart.nve.no\u002Fenterprise\u002Frest\u002Fservices\u002FInnsjodatabase2\u002FMapServer\u002F2\u002Fquery?where=vatnlnr+IN+(316)&outFields=*&f=geojson'\n","text",[284,285,281],"code",{"__ignoreMap":286},"",[215,288,289,290,293,294,297],{},"You can extend the IN clause to cover several lakes in one response. You can alse switch ",[284,291,292],{},"MapServer\u002F2"," with ",[284,295,296],{},"MapServer\u002F1"," for depth points.",[215,299,300],{},"So - that gave me a geojson file that is almost but not quite what I needed.",[266,302,304],{"id":303},"customization","Customization",[215,306,307,308,311,312,315],{},"The Guru Maps can can show fields in the data on the curve - but - I could not get it to play well with doing calculations in the geojson (using eval). So - my depth curves were showing as ",[284,309,310],{},"10,500000"," rather than ",[284,313,314],{},"10,5","  - it's correct but was a little crowded. The depth data is stored as a number so is formatted on display.",[215,317,318],{},"Rather than trying again and again - I decided to add a preformatted field to the data set using QGis.",[215,320,321,322],{},"Load the data into a new vector layer in qgis. Open the attribute table and enter edit mode. Look for the Field Calculator and add a new field - depth_label - of type text(string) with the following expression: ",[284,323,324],{},"format_number(dybde_m, 1)",[215,326,327],{},"That adds a pre-calculated value for each row to one decimal place - using a string - so that it is not formatted for display - just shown as is.",[215,329,330],{},"Now - export that layer as geojson.",[266,332,334],{"id":333},"styling","Styling",[215,336,337],{},"Now we need to style it. I used the following mapcss file to give me colours that worked for this data set:",[277,339,342],{"className":340,"code":341,"language":282},[280],"line[dybde_m] {\n    width: 1px;\n    text: eval(tag('depth_label'));\n    text-color: #FFFFFF;\n    font-size: 10;\n    font-stroke-width: 1px;\n    font-stroke-color: #000000;\n}\nline[dybde_m>=0][dybde_m\u003C2]   { color: #D6EAF8; width: 1px; }\nline[dybde_m>=2][dybde_m\u003C5]   { color: #AED6F1; width: 1px; }\nline[dybde_m>=5][dybde_m\u003C10]  { color: #5DADE2; width: 1.5px; }\nline[dybde_m>=10][dybde_m\u003C20] { color: #2E86C1; width: 1.5px; }\nline[dybde_m>=20][dybde_m\u003C30] { color: #1B4F72; width: 2px; }\nline[dybde_m>=30]             { color: #0B2942; width: 2.5px; }\n",[284,343,341],{"__ignoreMap":286},[215,345,346,347,350,351,354],{},"Finally - you need to get the geojson and mapcss into Guru Maps. To start with - as long as the files were of the same name (",[284,348,349],{},"foo.geojson","\u002F",[284,352,353],{},"foo.mapcss",") it figured it out - but after a while it starting creating a single layer per file.",[266,356,358],{"id":357},"creating-the-import","Creating the import",[215,360,361],{},"So - merge them into a .ms file:",[277,363,367],{"className":364,"code":365,"language":366,"meta":286,"style":286},"language-xml shiki shiki-themes github-dark","\u003C?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\u003CcustomMapSource overlay=\"true\">\n  \u003Cname>Display Name\u003C\u002Fname>\n  \u003Cgeojson>\u003C![CDATA[\n  CONTENTS_OF_GEOJSON_FILE\n  ]]>\u003C\u002Fgeojson>\n  \u003Cstyle>\u003C![CDATA[\n  CONTENTS_OF_MAPCSS_FILE\n  ]]>\u003C\u002Fstyle>\n\u003C\u002FcustomMapSource>\n","xml",[284,368,369,403,423,439,453,459,472,484,490,501],{"__ignoreMap":286},[370,371,374,378,381,385,388,392,395,397,400],"span",{"class":372,"line":373},"line",1,[370,375,377],{"class":376},"s95oV","\u003C?",[370,379,366],{"class":380},"s4JwU",[370,382,384],{"class":383},"svObZ"," version",[370,386,387],{"class":376},"=",[370,389,391],{"class":390},"sU2Wk","\"1.0\"",[370,393,394],{"class":383}," encoding",[370,396,387],{"class":376},[370,398,399],{"class":390},"\"UTF-8\"",[370,401,402],{"class":376},"?>\n",[370,404,406,409,412,415,417,420],{"class":372,"line":405},2,[370,407,408],{"class":376},"\u003C",[370,410,411],{"class":380},"customMapSource",[370,413,414],{"class":383}," overlay",[370,416,387],{"class":376},[370,418,419],{"class":390},"\"true\"",[370,421,422],{"class":376},">\n",[370,424,426,429,432,435,437],{"class":372,"line":425},3,[370,427,428],{"class":376},"  \u003C",[370,430,431],{"class":380},"name",[370,433,434],{"class":376},">Display Name\u003C\u002F",[370,436,431],{"class":380},[370,438,422],{"class":376},[370,440,442,444,447,450],{"class":372,"line":441},4,[370,443,428],{"class":376},[370,445,446],{"class":380},"geojson",[370,448,449],{"class":376},">",[370,451,452],{"class":390},"\u003C![CDATA[\n",[370,454,456],{"class":372,"line":455},5,[370,457,458],{"class":390},"  CONTENTS_OF_GEOJSON_FILE\n",[370,460,462,465,468,470],{"class":372,"line":461},6,[370,463,464],{"class":390},"  ]]>",[370,466,467],{"class":376},"\u003C\u002F",[370,469,446],{"class":380},[370,471,422],{"class":376},[370,473,475,477,480,482],{"class":372,"line":474},7,[370,476,428],{"class":376},[370,478,479],{"class":380},"style",[370,481,449],{"class":376},[370,483,452],{"class":390},[370,485,487],{"class":372,"line":486},8,[370,488,489],{"class":390},"  CONTENTS_OF_MAPCSS_FILE\n",[370,491,493,495,497,499],{"class":372,"line":492},9,[370,494,464],{"class":390},[370,496,467],{"class":376},[370,498,479],{"class":380},[370,500,422],{"class":376},[370,502,504,506,508],{"class":372,"line":503},10,[370,505,467],{"class":376},[370,507,411],{"class":380},[370,509,422],{"class":376},[215,511,512],{},"Then drag that into Guru Maps and you have the data.",[266,514,516],{"id":515},"result","Result",[215,518,519],{},[520,521],"img",{"alt":522,"src":523},"Femsjøen - Depth Curve","\u002Fimages\u002Fposts\u002F2026\u002F07\u002F17\u002Fdepth_curves.png",[479,525,526],{},"html pre.shiki code .s95oV, html code.shiki .s95oV{--shiki-default:#E1E4E8}html pre.shiki code .s4JwU, html code.shiki .s4JwU{--shiki-default:#85E89D}html pre.shiki code .svObZ, html code.shiki .svObZ{--shiki-default:#B392F0}html pre.shiki code .sU2Wk, html code.shiki .sU2Wk{--shiki-default:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}",{"title":286,"searchDepth":405,"depth":405,"links":528},[529,530,531,532,533],{"id":268,"depth":405,"text":269},{"id":303,"depth":405,"text":304},{"id":333,"depth":405,"text":334},{"id":357,"depth":405,"text":358},{"id":515,"depth":405,"text":516},null,"2026-07-17 11:36 +0200","NVE have a lot of data available via atlas.","md","I wanted to get the depth curves for the lakes in Haldenvassdraget (Halden rivers\u002Flakes) into geojson format.",{},true,"\u002F2026\u002F07\u002F17\u002Fdepth-curves-for-the-lakes-of-the-halden-river-system",{"title":210,"description":536},{"loc":541},"2026\u002F07\u002F17\u002Fdepth-curves-for-the-lakes-of-the-halden-river-system",[546,547,446,548,549,550],"gis","qgis","gurumaps","maps","halden","dcr6frkiNmyap3p8M3Zvah7SDcn03HG8hx-LF2KWrqw",1784290739127]