[Carto] Four Steps to Moving Forward With a Spec, Input File, and Working Map Rendering Engine Prototype

George Silva georger.silva at gmail.com
Thu Apr 8 17:35:47 EDT 2010


This separation of concerns is interesting. We should be able to style
layers, but there is already a good format for that, as Tyler (I guess)
remembered: SLD.

The idea of the repository and trying to output a simple roads theme is also
good. Python is not my default language of choice, but I do have some
fluency on it and I'm thrilled to help.

So, what about the specs? Lets start off with the simpler objects, like maps
and map frames? 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.

George

On Thu, Apr 8, 2010 at 6:24 PM, Landon Blake <lblake at ksninc.com> wrote:

>  Looks like we’ve got a good start with material posted by Carlos, Paul,
> and George. I would like to suggest the following actions be taken in
> sequential order:
>
>
>
> (1)     Decide if we will separate layout information (like page size,
> margins, graphical components, inset map info) and styling information
> (label font, label size, stroke color, fill patterns). I think this
> separation is a good idea.
>
> (2)     Decide on a list of elements or items that we want to support for
> both the layout and style components of the specification.
>
> (3)     Decide on a file format that will be consumed by map rendering
> engines that support or spec. This could be XML, plain text, YAML or
> something else. No need to have a flame war about the file format, we just
> need to pick something.
>
> (4)     Start writing a draft specification document (maybe on the wiki)
> and a sample input file based on the list of elements from step 2. Remember
> that these two (2) documents are not the same thing.
>
>
>
> I’m not saying we can’t have intense discussions about the details, but
> we’ve got some momentum and the steps I listed above might help keep us
> moving.
>
>
>
> I’d also suggest that keeping the spec and input file as simple as possible
> to begin with will be helpful. Let’s “release early, release often” and add
> things to the spec as we go. If we try to do everything at once we might bet
> overwhelmed.
>
>
>
> I think it might be helpful to have some code that we can use to start
> processing our sample input file to produce some type of output. Having some
> working prototype code will help us find problems with the input file and
> spec early on in the process. I know that Tyler mentioned Python as a
> possible choice. I can live with that. :] Can we throw together an SVN repo
> somewhere that can hold code for the prototype we will use to test the input
> file and spec?
>
>
>
> I’ll get an SVN repo for a Python prototype set up if that has the groups
> support.
>
>
>
> I say we follow the steps above with the following goals:
>
>
>
> Define a specification and input file that defines the simplest possible
> map rendering information. When I say simple, I mean the least amount of
> information. Let’s put together an input file and some working Python code
> that could create a rendered map image (JPEG or TIFF) from an ESRI Shapefile
> or WKT file containing some simple road geometries.
>
>
>
> I think the leanest input file we can use might be:
>
> -          Map width and height.
>
> -          Scale of the map.
>
> -          Stroke color and line thickness of the vectors being rendered.
>
> -          Source of the geospatial data being rendered.
>
> -          Destination of the output file.
>
>
>
> We can start adding items to our input file (like legends, map insets,
> girds, polygon fill styles, etc.) as we go.
>
>
>
> Not everyone is a fan of the agile development style, and I might be moving
> too fast, but this is how I would move us forward. Start bare bones, get
> something that works, and then add functionality.
>
>
>
> *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 *Carlos Gabriel Asato
> *Sent:* Thursday, April 08, 2010 10:40 AM
> *To:* George Silva; carto at lists.osgeo.org
> *Subject:* Re: [Carto] Map specifications
>
>
>
> Dear all
>
> This is a map schema I am using for map production in my geological survey.
> It works fine for maps composed of only one map frame. I made some
> modification trying to adapt it for a map with multiple map frames. The
> original program that use this scheme was made using Arc-Info AML (I have
> some ideas to port it to the next ARCGIS Python). This scheme does not
> include metadata and is a good idea to include it.
>
> The idea behind of this scheme is try to give flexibility on styles and
> data source management and re-use. It works fine for model based
> cartography.
>
> <map>
>
> <page name=anything>
>   <orientation>['v','h']</orientation> #if orientation is null v is default
>   <page_name>['a0','a1','a2'......]</page_name>
>   # if page name is not given then
>   <page_size width='any number in cm' height='any number in cm'>
>
>    <margins up='any number' down=''any number' left='any number' right='any
> number' units=[cm,inch,mm.....]>
>   <background_color>any_color</background_color>
>
>   <guideLine name=anything> # define guide lines or positions of simetry
> for placing cartographic objects
>     <xplace>middlepage</xplace>
>     <yplace units='cm'>margin.up - 10</yplace>
>   </guideLine>
>
>   <guidePoint name=anything>
>      <xplace units='mm'>30</xplace>
>      <yplace units='mm'>300</xplace>
>   </guidePoint>
>
>
>   <insets type=[text, image/jpg, image/svg, legend, document, ]
> name=anything src=[file, http, dbconnector..]>
>     <insetParam paramName=anything>value</insetParam>
>     <insetParam paramName=width units=mm>25</insetParam>
>     <insetParam paramName=xposition units=mm>30</insetParam># relative to
> page margins
>     <insetParam paramName=relativeposition >centerpage</insetParam>#
> relative to page margins
>     <insetParam paramName=xrelativeposition >middlepage</insetParam>#
> relative to page margins
>     <insetParam paramName=xrelativeposition >GuideLineDummy1</insetParam>#
> relative to page margins
>     <insetParam paramName=origin >0 0</insetParam>
>     <insetParam paramName=origin >middle middle</insetParam>
>  </insets>
> </page>
>
>
>
> <mapStructure name=anything>
>   <MapFrameDefID>...
>   <MapDefStyleID>...
>   <DataSourceCollectionID>...
>   <GridStyleID>
> </mapStructure>
>
> <mapStructure name=anything2>
>   <MapFrameDefID>...
>   <MapDefStyleID>...
>   <DataSourceCollectionID>...
>   <GridStyleID>
> </mapStructure>
>
> .....
>
> <MapFrame name=anything>
>
> <box>xmin ymin xmax ymax</box>
> <FrameStyle>
>   <boxStyle>......
>   <backgroundstyle>..
>   <ScaleStyle>......
>   <insets type=[text, image/jpg, image/svg, legend, document, ]
> name=anything src=[file,http; dbconnector]>
>     <insetParam paramName=anything>value</insetParam>
>     <insetParam paramName=width units=mm>25</insetParam>
>     <insetParam paramName=xposition units=mm>30</insetParam># relative to
> frame
>     <insetParam paramName=relativeposition >centerframe</insetParam> #
> relative to frame
>     <insetParam paramName=xrelativeposition >middleframe</insetParam>#
> relative to frame
>     <insetParam paramName=origin >0 0</insetParam>
>     <insetParam paramName=origin >middle middle</insetParam>
>     .....
>     ......
>   </insets>
>
>
> </FrameStyle>
> </MapFrame>
>
>
> <mapDef name=anything>
> <scale>[any number, automatic]
> <mapSRS>EPSG:22634 .......# if no EPSG code is given other tags of forms
> (may proj4 declaration) can be used for srs definition
> <mapExtend>['absolute defined by geographic or planar coordinate',
> 'relative defined by a boundary of an object']</mapExtend>
> <mapAngle>.........
>
>
> </mapDef name=anything>
>
>
>
> <DataSourceCollection name=anything>
>   <layer name='mustBeUnique'>.......  </layer> #can be file, url, etc, etc
>   <layer name='mustBeUnique'>.......</layer>
>   <layer name='mustBeUnique'>.......</layer>
>   <layer name='mustBeUnique'>.......</layer>
> </DataSourceCollection>
>
> #For this sections is much better use SLD standard????
> <LayerRepresentation>
> <layerDisplay>
>   layerName objectType pallete symbol LUT  SelectionParameters
>
> </LayerRepresentation>
>
>
> <GridDef>
>   <BoundaryDef>[box(xmin,ymin,xmax,ymax), "a geographic object", "a polygon
> in WKT",......]
>   <BoundarySRS> EPSG:
>   <BoundaryStyle>palette, color, etc..
>
>   <grid name=geo>
>       <gridSRS> EPSG:
>       <gridStyle type=[grid, marks,...] >palette, color, xinterval,
> yinterval, labelingStyle, marksymbol,linesymbol.......
>       <LabelingStyle>font, size, color, orientation, template, offset
>    </grid>
>    <grid name=planar>
>       <gridSRS> EPSG:
>       <gridStyle type=[grid, marks,...] >palette, color, xinterval,
> yinterval, labelingStyle.......
>       <LabelingStyle>font, size, color, orientation, template, gridOffset
>    </grid>
>
> <GridDef>
>
> </Map>
>
> I hope no forget anything!!!.
>
> Please make the comments you think appropiate
>
> 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:* George Silva <georger.silva at gmail.com>
> *Para**:* carto at lists.osgeo.org
> *Enviado:* miércoles, 7 de abril, 2010 22:26:48
> *Asunto:* [Carto] Map specifications
>
> Hello everyone,
>
> I would like to try to get the ball rolling, so I thought to start simple.
> I'm not familiar with Mapnik also, so please bear with me.
>
> What are the components of a map document (this are just informal ideas,
> give your opinion about them :P)
>
> "Map Metadata"
> Author
> Date/time
> Subject
> Description
>
> Size (width x height)
> Graphics (north arrow, title, other pictures, etc)
> Ordered set of "views" (I'm calling a view what would be a map inset, a map
> inside another map)
>
> Each "view" should have:
>
>       Size of map-inset
>       Extent
>       Scale
>       Projection (datasets have projections, but they can be represented in
> a different projection)
>       Ordered set of Layers
>       [Coordinate grid] (each of these should be graphic? should these be
> tied up to each "view" or they are independent map graphics?)
>       [Scale Bar]
>       [Scale Text]
>       [Legend]
>       other elements I'm missing?
>
> Since XML was mentioned by Tyler, I tried a top-bottom approach.
>
> Any ideas about these?
>
> Thank you for your patiente :P
>
> George
>
> --
> 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.
>
> _______________________________________________
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/carto/attachments/20100408/f08bf34f/attachment-0001.html


More information about the Carto mailing list