[Carto] Sample Map Rendering Input File

Carlos Gabriel Asato g_asato2000 at yahoo.com
Fri Apr 9 08:39:23 EDT 2010


Well

I think I can do fine programming departamental codes. That means a Python programming code that is no so elegant but that works fine. I am geologist a person who learnt programming by myself but I have to much experience making programs for automatic map production with a procedural language but written with an object oriented like style. I am considering me a person who knows about programming restrictions in cartographic production and usually I can got the best of my programs because I think I can recongize the limits of computer methods.

Production python code, I think, must take in account carefully other elements like error detection routines, the use of version control systems and probably other methods/tools suggested by the good practice manual that I am not so familiar but I know is not impossible to learn in short term.


(1)     What is the best Python library to use for parsing XML?
What about xml parsing. Yes I have some experience processing xml with python and I did it by using standard and common python libraries like minidom. minidom is something simple and it create a dom object and you can navigate on it going from leaf to leaf but I am not sure that it will be a good library for parsing XML in a complete manner.

On programming I am usually work in a very conservative manner, I usually look for the most supported modules and I also I like to review if the implemented methods by the module are alike the standard methods (in this case all standard methods used in xml processing). I am not an expert but following the last enouced criteria I think the best way is use the standard xml.dom library.


(2)     Is there an existing Python library for parsing WKT? 


I am not sure but I think this is something that is not so complicate to develop.

(3)     I believe we can use OGR for reading ESRI Shapefiles. Is this what
you would recommend?

If the idea is create a code on top of MapNik, I think the best strategy will be use MapNik python API.


(4)     Is there an existing library that can take some sort of vector
geometries and convert them to rasters? (Something like the Java 2D graphics
library?) 
I think you are telling me about vector to raster convertion as a GIS process. I've never ear about library for convert vector to rasters but there are some python modules that are so popular, I think can be use for doing something like this. PIL (Python Image Library) and SciPy (Scientific Python that include several recognized modules).

Now that I think about it, using a vector
format like EPS or SVG might be easier than raster for the first output of the
sample rendering engine.

 
Whatever you will whant to do when you print a map you must pass before from svg as a graphical format and then ps or eps as pre-printing format.

This is the schema of this workflow

data -> representation display -> svg generation -> pre-printing format (ps or eps)
                                                    -> pdf
                                                                                   ->pdf
Regards

Gabriel Asato
Unidad Sensores Remotos y SIG
Servicio Geológico Minero Argentino
(SEGEMAR)
Av. Julio A. Roca 651 p 8 of 1
Cdad. Autónoma de Buenos Aires
ARGENTINA


tel 54-11-4349-3158/26
fax 54-11-4349-3287




________________________________
De: Landon Blake <lblake at ksninc.com>
Para: Carlos Gabriel Asato <g_asato2000 at yahoo.com>; carto at lists.osgeo.org
Enviado: jueves, 8 de abril, 2010 21:48:29
Asunto: RE: [Carto] Sample Map Rendering Input File

 
It sounds like Python is the winner.
 
Carlos: Do you have experience with
Python? If you do, can you help with the following questions:
 
(1)     What is the best Python library to use for parsing XML?
(2)     Is there an existing Python library for parsing WKT? 
(3)     I believe we can use OGR for reading ESRI Shapefiles. Is this what
you would recommend?
(4)     Is there an existing library that can take some sort of vector
geometries and convert them to rasters? (Something like the Java 2D graphics
library?) 
 
Now that I think about it, using a vector
format like EPS or SVG might be easier than raster for the first output of the
sample rendering engine.
 
Landon
Office Phone Number: (209) 946-0268
Cell Phone Number: (209) 992-0658
 
 

________________________________
 
From:Carlos Gabriel
Asato [mailto:g_asato2000 at yahoo.com] 
Sent: Thursday, April 08, 2010
5:44 PM
To: Landon Blake
Subject: Re: [Carto] Sample Map
Rendering Input File
 
Python is nice for me!!

Best regards
 
Gabriel Asato
Unidad Sensores Remotos y SIG
Servicio Geológico Minero Argentino
(SEGEMAR)
Av. Julio A. Roca 651 p 8 of 1
Cdad. Autónoma de Buenos Aires
ARGENTINA
tel 54-11-4349-3158/26
fax 54-11-4349-3287
 
 

________________________________
 
De:Landon
Blake <lblake at ksninc.com>
Para: George Silva
<georger.silva at gmail.com>; carto at lists.osgeo.org
Enviado: jueves, 8 de abril, 2010
21:01:20
Asunto: RE: [Carto] Sample Map
Rendering Input File
George,
 
I need some more time to look at your
changes, but I quickly skimmed the XML file you provided, and I think we are
headed in the correct direction. I remember considering the requirement to
render multiple layers (roads and rivers, for example) from the same input file
after I sent my first sample. That means you’ve got to think about z ordering
when you render and about associating a style with each layer. It looks like
you’ve done this with some of your changes. I will try to ask some questions
about your other mods and post a revised XML file based on your suggestions
tomorrow.
 
If we get a simple input file busted out
before the weekend I can start putting together some test code next week. I’ll
need help with some suggestions from the group on the best way to handle XML
and WKT in Python. Unless there is little interest in the Python code among our
group, in which case I will use Java, since I will be much faster with that
language. :]
 
Landon
Office Phone Number: (209) 946-0268
Cell Phone Number: (209) 992-0658

________________________________
 
From:carto-bounces at lists.osgeo.org [mailto:carto-bounces at lists.osgeo.org] On Behalf Of George Silva
Sent: Thursday, April 08, 2010
4:29 PM
To: carto at lists.osgeo.org
Subject: Re: [Carto] Sample Map
Rendering Input File
 
Hello Lando,

I looked at your schema quickly and made some "changes". I just
noticed that I'm mixing map composition (within a software) with map printing
properties. Sorry about that.

This of course, is just a suggestion :P

Please let me know what you think.

George
On Thu, Apr 8, 2010 at 8:04 PM, Tyler Mitchell (OSGeo) <tmitchell at osgeo.org> wrote:
Paul Spencer, I'd be very interested in your thoughts on how closely
one
should model after existing APIs, thinking of MapServer MapScript for
example.  I assume the MAP->LAYER->STYLE->CLASS approach is used
by many
apps in slightly different ways..?

Tyler

Landon Blake wrote:
> Is formatting an XML doc on the wiki a pain in the neck?
>
> How about the doc I attached as a starting point for an input file?
> (It's XML!) :]
>
> Landon
> Office Phone Number: (209) 946-0268
> Cell Phone Number: (209) 992-0658
>
>
>
> -----Original Message-----
> From: Tyler Mitchell (OSGeo) [mailto:tmitchell at osgeo.org]
> Sent: Thursday, April 08, 2010 3:39 PM
> To: George Silva
> Cc: Landon Blake; carto at lists.osgeo.org
> Subject: Re: [Carto] Four Steps to Moving Forward With a Spec, Input
> File, and Working Map Rendering Engine Prototype
>
> George Silva wrote:
>> I guess we could use some sort of UML or something
>> near that to arrange all our ideas too. I'm not sure if everyone likes
>> UML, but it helps me think and it's a great form of documenting. If
>> anyone can suggest another, please do.
>
> I'm hoping we can stick with a simple list of properties with too much
> inner complexity needing diagramming.  If we need we could do up an
XML
> schema style document right in the wiki - would that be reasonable?
>
>
> Warning:
> Information provided via electronic media is not guaranteed against
defects including translation and transmission errors. If the reader is not the
intended recipient, you are hereby notified that any dissemination,
distribution or copying of this communication is strictly prohibited. If you
have received this information in error, please notify the sender immediately.
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Carto mailing list
> Carto at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/carto

_______________________________________________
Carto mailing list
Carto at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/carto



-- 
George R. C. Silva

Desenvolvimento em GIS
http://blog.geoprocessamento.net
 
Warning:
Information provided via electronic media is not guaranteed
against defects including translation and transmission errors. If the reader is
not the intended recipient, you are hereby notified that any dissemination,
distribution or copying of this communication is strictly prohibited. If you
have received this information in error, please notify the sender immediately.
 

________________________________
 

Encontra las mejores recetas con Yahoo! Cocina. 
http://ar.mujer.yahoo.com/cocina/


      Yahoo! Cocina

Encontra las mejores recetas con Yahoo! Cocina.


http://ar.mujer.yahoo.com/cocina/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/carto/attachments/20100409/a49c5295/attachment-0001.html


More information about the Carto mailing list