Relating/combining database fields with svg

Share your Inkscape tricks and tutorials here.
BoLa-Arq
Posts: 1
Joined: Mon Mar 01, 2010 10:14 pm

Relating/combining database fields with svg

Postby BoLa-Arq » Mon Mar 01, 2010 11:31 pm

Hi

I somehow need to relate an svg-file with data from a database, but how to ? (At work I can use advanced GIS-Software like Mapinfo, but not all have license for this tool).

Example

Lets say: 4 polygons with their own unique ID, should be able to change color depending on which value they are related to in the database.
The idea is to make a webbased map (Firefox) of the municipality wich I work in, and then relate different uses to different colors etc. So my collegues quickly can see where is different isues, and example could be polluting factories.

I have not been able to find a solution, but I ques it should be possible in InkScape ?

Best regards,

Mads Boserup Lauritsen, Denmark

User avatar
syllie
Posts: 48
Joined: Fri Jan 15, 2010 3:51 pm
Location: Sydney, Australia
Contact:

Re: Relating/combining database fields with svg

Postby syllie » Tue Mar 09, 2010 1:29 pm

Hi Mads,

That is quite a technical question!

I have some difficulties visualizing your question, but hopefully my first answer will give you some pointers and if I misunderstood you , please try again!

All SVG drawings are stored in XML format. You can traverse these files with programming tools, directly query and edit them, or import them into a database structure.
Inkscape identifies each object with an ID and allows a label, title and description to be added (right click on an object > Object Properties).
These attributes are directly accessible through the XML-editor (Edit >XML-editor, or use any XML tool externally on the svg file)
For this object also other attributes (like style - including the colour) are listed, and you can directly modify those.

Technically this does not seem to be a too difficult problem, but it depends upon how you store your original data. If the municipality is divided in sectors, reporting is required per sector and the sectors are properly named, then updating/generating modified data based upon the SVG file should not pose a too big a problem. You should dive in the developers corner to see what attributes are available, and base your mapping / system design on this accordingly.

This approach of course differs greatly from a coordinate based pinpointing system (like GIS / MapInfo and so on).

I hope this provides you with some ideas and at least a starting point.

Cheers,
Syllie
Life is the art of drawing without an eraser. (John W. Gardner)

http://verysimpledesigns.com - graphics resources
http://syllie.com - personal website


Return to “Tricks & Tutorials”