2

I got a kmz-file from an organization and the attribute table has a colum 'description' with a synthax that holds import information (such as date built, water source, village etc.) instead of a different colum for each variable. for example:

<table border=0 cellpadding=0 cellspacing=0  width=250 style="FONT-SIZE: 11px; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif;"><tr><td bgcolor="#E3E1CA" align="right"><font COLOR="#000000"><b>ID</b></font></td><td bgcolor="#E4E6CA"> <font COLOR="#008000">905</font></td></tr><tr><td bgcolor="#E3E1CA" align="right"><font COLOR="#000000"><b>PAGE</b></font></td><td bgcolor="#E4E6CA"> <font COLOR="#008000">853</font></td></tr><tr><td bgcolor="#E3E1CA" align="right"><font COLOR="#000000"><b>NAME_EN</b></font></td><td bgcolor="#E4E6CA"> <font COLOR="#008000">Miqitning Aldidiki Karez</font></td></tr><tr><td bgcolor="#E3E1CA" align="right"><font COLOR="#000000"><b>VILLAGE</b></font></td><td bgcolor="#E4E6CA"> <font COLOR="#008000">Digar Village</font></td></tr><tr><td bgcolor="#E3E1CA" align="right"><font COLOR="#000000"><b>TOWN</b></font></td><td bgcolor="#E4E6CA"> <font COLOR="#008000">Digar Town</font></td></tr><tr><td bgcolor="#E3E1CA" align="right"><font COLOR="#000000"><b>COUNTY</b></font></td><td bgcolor="#E4E6CA"> <font COLOR="#008000">Piqan County</font></td></tr><tr><td bgcolor="#E3E1CA" align="right"><font COLOR="#000000"><b>SOURCE</b></font></td><td bgcolor="#E4E6CA"> <font COLOR="#008000">Kokya Water System</font></td></tr><tr><td bgcolor="#E3E1CA" align="right"><font COLOR="#000000"><b>YEAR</b></font></td><td bgcolor="#E4E6CA"> <font COLOR="#008000">0</font></td></tr><tr><td bgcolor="#E3E1CA" align="right"><font COLOR="#000000"><b>LENGTH</b></font></td><td bgcolor="#E4E6CA"> <font COLOR="#008000">1600</font></td></tr><tr><td bgcolor="#E3E1CA" align="right"><font COLOR="#000000"><b>SHAFTS</b></font></td><td bgcolor="#E4E6CA"> <font COLOR="#008000">55</font></td></tr><tr><td bgcolor="#E3E1CA" align="right"><font COLOR="#000000"><b>HEAD_DEPTH</b></font></td><td bgcolor="#E4E6CA"> <font COLOR="#008000">8</font></td></tr><tr><td bgcolor="#E3E1CA" align="right"><font COLOR="#000000"><b>OLD_FLOW__</b></font></td><td bgcolor="#E4E6CA"> <font COLOR="#008000">15</font></td></tr><tr><td bgcolor="#E3E1CA" align="right"><font COLOR="#000000"><b>OLD_YEAR</b></font></td><td bgcolor="#E4E6CA"> <font COLOR="#008000">0</font></td></tr><tr><td bgcolor="#E3E1CA" align="right"><font COLOR="#000000"><b>NEW_FLOW__</b></font></td><td bgcolor="#E4E6CA"> <font COLOR="#008000">0</font></td></tr><tr><td bgcolor="#E3E1CA" align="right"><font COLOR="#000000"><b>NEW_YEAR</b></font></td><td bgcolor="#E4E6CA"> <font COLOR="#008000">0</font></td></tr><tr><td bgcolor="#E3E1CA" align="right"><font COLOR="#000000"><b>ACTIVE</b></font></td><td bgcolor="#E4E6CA"> <font COLOR="#008000">0</font></td></tr><tr><td bgcolor="#E3E1CA" align="right"><font COLOR="#000000"><b>DRIED_YEAR</b></font></td><td bgcolor="#E4E6CA"> <font COLOR="#008000">1995</font></td></tr><tr><td bgcolor="#E3E1CA" align="right"><font COLOR="#000000"><b>RECOVERABL</b></font></td><td bgcolor="#E4E6CA"> <font COLOR="#008000">1</font></td></tr><tr><td bgcolor="#E3E1CA" align="right"><font COLOR="#000000"><b>REMARKS</b></font></td><td bgcolor="#E4E6CA"> <font COLOR="#008000"></font></td></tr><tr><td bgcolor="#E3E1CA" align="right"><font COLOR="#000000"><b>DIRECTION</b></font></td><td bgcolor="#E4E6CA"> <font COLOR="#008000">288,006462734</font></td></tr></table>

I suspect that I can built an expression so that I can categorize the symbology based on these variables ( for example: each polygon with the same type of water source the same colour) but I don't know how to built an expression like that, querying the specific colum 'description'. My other option is adding a colum for each variable in the syntax and adding the information manualy but there are more then 200 entries so I am looking for another solution.

  • 1
    regexp_match is your friend. – Erik Mar 25 at 10:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.