Posts Tagged ‘geografía’

Creating and personalizing KML code (placemarks).

2009/08/11

First of all, what is KML?. KML is a file format used to display geographic data in an Earth browser, such as Google Earth, Google Maps, and Google Maps for mobile. You can create KML files to pinpoint locations, add image overlays, and expose rich data in new ways. KML is an international standard maintained by the Open Geospatial Consortium, Inc. (OGC). You can choose wether authoring directly from Google Earth itself or you can try to understand the code and doing it by yourself… You can draw placemarks (using descriptive HTML to personalize them), ground overlays, paths, polygons… Let’s start with the placemark:

-> Simple placemark

<?xml version=”1.0″ encoding=”UTF-8″?>
<kml xmlns=”http://www.opengis.net/kml/2.2″&gt;
  <Placemark>
    <name>Simple placemark</name>
    <description>Attached to the ground. Intelligently places itself
       at the height of the underlying terrain.</description>
    <Point>
      <coordinates>-122.0822035425683,37.42228990140251,0</coordinates>
    </Point>
  </Placemark>
</kml>

simpleplacemark

  • An XML header. This is line 1 in every KML file. No spaces or other characters can appear before this line.
  • A KML namespace declaration. This is line 2 in every KML 2.2 file.
  • A Placemark object that contains the following elements:
    • A name that is used as the label for the Placemark
    • A description that appears in the “balloon” attached to the Placemark
    • A Point that specifies the position of the Placemark on the Earth’s surface (longitude, latitude, and optional altitude)
  • -> Floating placemark

    <?xml version=”1.0″ encoding=”UTF-8″?>
    <kml xmlns=”
    http://www.opengis.net/kml/2.2” xmlns:gx=”http://www.google.com/kml/ext/2.2” xmlns:kml=”http://www.opengis.net/kml/2.2” xmlns:atom=”http://www.w3.org/2005/Atom“>
    <Document>
     <name>Floating placemark.kml</name>
     <Style id=”downArrowIcon”>
      <IconStyle>
       <Icon>
        <href>http://maps.google.com/mapfiles/kml/pal4/icon28.png</href&gt;
       </Icon>
      </IconStyle>
     </Style>
     <Placemark>
      <name>Floating placemark</name>
      <description>Floats a defined distance above the ground.</description>
      <LookAt>
       <longitude>-122.0839597145766</longitude>
       <latitude>37.42222904525232</latitude>
       <altitude>0</altitude>
       <range>500.6566641072245</range>
       <tilt>40.5575073395506</tilt>
       <heading>-148.4122922628044</heading>
      </LookAt>
      <styleUrl>#downArrowIcon</styleUrl>
      <Point>
       <altitudeMode>relativeToGround</altitudeMode>
       <coordinates>-122.084075,37.4220033612141,50</coordinates>
      </Point>
     </Placemark>
    </Document>
    </kml> 

    floatingplacemark

    -> Extruded placemark

    <?xml version=”1.0″ encoding=”UTF-8″?>
    <kml xmlns=”
    http://www.opengis.net/kml/2.2” xmlns:gx=”http://www.google.com/kml/ext/2.2” xmlns:kml=”http://www.opengis.net/kml/2.2” xmlns:atom=”http://www.w3.org/2005/Atom“>
    <Document>
     <name>Extruded placemark.kml</name>
     <Style id=”globeIcon”>
      <IconStyle>
       <Icon>
        <href>http://maps.google.com/mapfiles/kml/pal3/icon19.png</href&gt;
       </Icon>
      </IconStyle>
      <LineStyle>
       <width>2</width>
      </LineStyle>
     </Style>
     <Placemark>
      <name>Extruded placemark</name>
      <description>Tethered to the ground by a customizable
              &quot;tail&quot;</description>
      <LookAt>
       <longitude>-122.0845787421525</longitude>
       <latitude>37.42215078737763</latitude>
       <altitude>0</altitude>
       <range>365.2646606980322</range>
       <tilt>40.55750733918048</tilt>
       <heading>-148.4126684946234</heading>
      </LookAt>
      <styleUrl>#globeIcon</styleUrl>
      <Point>
       <extrude>1</extrude>
       <altitudeMode>relativeToGround</altitudeMode>
       <coordinates>-122.0857667006183,37.42156927867553,50</coordinates>
      </Point>
     </Placemark>
    </Document>
    </kml>

    extrudedplacemark

    If instead of regular <description>

    <description>Attached to the ground. Intelligently places itself
           at the height of the underlying terrain.</description>

    simple

    you use the CDATA element, you can write HTML and avoiding Google Earth from parsing the code incorrectly:

     <description>
            <![CDATA[
              <h1>CDATA Tags are useful!</h1>
              <p><font color=”red”>Text is <i>more readable</i> and
              <b>easier to write</b> when you can avoid using entity
              references.</font></p>
            ]]>
          </description>

     cdata

    News: Capaware, an opensource 3D geographical Multilayer Framework… First steps…

    2009/08/10

    I discovered this project a few months ago and I’ve been following them very close. It’s always very interesting for freelancers and self taught professionals having an opensource 3D framework to start building your own scenaries not needing to pay a big amount of money for a license… I will do my best to upload here my own projects but let me post you this as a starter… Welcome Capaware!!.

    http://www.capaware.org

    capaware

    Capaware! is a framework for developing 3D multilayer geographical worlds.So powerful as it allows execution of applications directly over it, offers a wide range of applications. To have a quick composition of the stage,nothing better than working directly in three dimensions.

    Capaware! allows viewing of large tracts of land with the minimum amount of information necessary to show it. Those parties that are not visible are not processed, so that the processor loads the minimum memory needed at all times.

    Capaware!, which is developed in C++, allows connection to external servers using OGC protocol to obtain data. We can also configure and manage the resource layers and elements that can be displayed on the ground. Capaware! integrates within GPL free software components for its implementation. Specifically these components are:

    •  OpenScenegraph
    •  WxWidgets
    •  Curl
    • Boost

    Capaware_rc1

    Capaware es un software libre, orientado al desarrollo de aplicaciones geográficas multicapa con visualización tridimensional, desarrollado a medias entre la Universidad de Las Palmas y el Instituto Tecnológico de Canarias. Funciona tanto como SDK para desarrolladores, como también una aplicación individual para visualizar información geográfica, conectando a servidores que cumplan los estándares OGC (Open Geospatial Consortium), y que permite insertar elementos 3D sobre el terreno, compartidos por múltiples usuarios.

    Está dirigido tanto a profesionales que necesiten visualizar información geográfica de forma realista, como a desarrolladores que quieran implementar cualquier aplicación gráfica con especial énfasis en la navegación de terrenos (por poner un ejemplo, desde un SIG 3D hasta un videojuego).

    Windmills (wind turbines). Geovisualization live!

    2009/08/10

    I will do my best to build a 3d scenario incluiding a few wind generators located very close to Pancorbo Cliff, North of Spain, about 320 km from Madrid. As usual, I started getting a model from 3D warehouse and included inside my google sketch up session… after that it was just placing it in my GE scenario… That’s it!. Now a little bit of literature: 

    wind_01

    The most modern generations of windmills are more properly called wind turbines, or wind generators, and are primarily used to generate electricity. Modern windmills are designed to convert the energy of the wind into electricity. The largest wind turbines can generate up to 6MW of power (for comparison a modern fossil fuel power plant generates between 500 and 1,300MW).

    wind_02

    With increasing environmental concern, and approaching limits to fossil fuel consumption, wind power has regained interest as a renewable energy source. It is increasingly becoming more useful and sufficient in providing energy for many areas of the world.

    wind_03

    One area where turbines have become feasible is in the Midwestern United States, due to great amounts of wind.

    wind_04

    Source: Wikipedia

    wind_05

    Hope you liked it.
    Alberto
    BA Geography
    MSc GIS and Remote Sensing
    GIS Technician
    albertoconcejal -at -gmail.com

    Getting textures from Google Maps – Street View

    2009/08/05

    I this post I am trying to show you how easy is adding a building to your scenario using textures from Google Maps (Street View). You have to know a little bit about Photoshop and layers and these stuff but it’s pretty easy thou…

    First step, capturing my screen…OMG!!! there’s a tree in the middle of the building I want to model… there is no need to worry about it… Photoshop deals with it very well!!.

    vic01_old

    vic02_old

    vic03_old

    And after taking these three pictures I finally get this one (Thank you Photoshop!!!)… I could have done it much better but this is just for you to know the way to do it… its not that bad thou!

    vic_lat_def

    Second step: Start modelling… Im not teaching you how to model but I can tell you it’s a piece of cake… just try it. Of course I am using my beloved Google Sketchup. I get my current GE’s view:

    defi01

    Defining XYZ axes, first blocks… just starting dudes!…

    defi02

    Applying textures I had already got from Adobe Photoshop…

    defi03

    defi04

    And after a few minutes modelling this is what I finally get:

    defi05

    Hey, It looks like more or less realistic!!!

    defi06

    Third and last step: Let’s go to Google Earth…

    defi07

    defi08

    These two blocks of buildings are very close to where I live here in Madrid. Vicálvaro is 10 minutes to Madrid downtown by car… It’s far away but now it’s in your computer…cool, isn’t it?.

    Alberto
    BA Geography
    MSc GIS and Remote Sensing
    GIS Technician
    albertoconcejal -at -gmail.com

    WMS in Google Earth.

    2009/08/04

    I have thought there is something very interesting maybe you guys have never tried… using your Google Earth sesssion not just for navigating, finding your house or the place you are going on holidays to… If you use the WMS protocol to show your map over your 3D scenario you are going to add a little bit more of interest to your Google Earth… Lets add a Corine Land Cover Map over my 3D map…but, What is WMS???, What is Corine Land Cover???. Im not even trying to tell you by myself, I am opeining my WIKIPEDIA to tell you, hehe…

    WMS

    A Web Map Service (WMS) is a standard protocol for serving georeferenced map images over the Internet that are generated by a map server using data from a GIS database. The specification was developed and first published by the Open Geospatial Consortium in 1999.

    CORINE LAND COVER

    CORINE (Coordination of information on the environment) is a European programme initiated in 1985 by the European Commission, aimed at gathering information relating to the environment on certain priority topics for the European Union (air, water, soil, land cover, coastal erosion, biotopes, etc.). Since 1994, the European Environment Agency (EEA) integrated CORINE in its work programme. EEA is responsible for providing objective, timely and targeted information on Europe’s environment.

    This is the Official Corine Land Cover key map.

    LEYENDA_CORINE

    This is the area I would like to know more about, Chiclana de la Frontera in Cádiz, SW of Spain.

    chiclana01

    This is once we get connected via WMS to the place where you can get those maps (http://www.idee.es/wms/IGN-Corine/IGN-Corine?). By the way you can search on the internet to get more maps… you just have to go to google and search for ‘wms maps’ and you’ll be able to find them. This is a Corine Land Cover Map with information from year 1990.

     chiclana02

    This is a Corine Land Cover Map with information from year 2000.

    chiclana03

    This is what we find after comparing both images… I have compared them using Photoshop CSX but you can go further and use global Mapper, ER Mapper or ArcGIS… As you can see, those areas highlighed are the areas with changes (very small in this case)…

    chiclana04

    More geographic post to come very soon!!!

    Alberto

    Modelling Madrid 3D. Geovisualization live!

    2009/07/29

    And now, Let’s start with a 3D model… this is not very simple thou…

    First of all we have a flat /2D scenary at GE, no much more than 50 cm of resolution. The place is very close to Madrid downtown, a very big neighborhood called Moratalaz…we will find there two very big towers of about 50 meters high:

    torres01

    As I said in the last post now we first open SU (Sketch-up by Google) and click on ‘get current view‘… This is more or less what we will find:

    torres02

    Let’s start modelling…I’m not telling you here the way you should model it… I’m just telling you that It is a PIECE OF CAKE!!!!!!!… This model has thousands of pieces but I just spent about 15 hours in modelling them all…

    I have used something called ‘components‘… this means that you -for instance- design a floor and later on you can repeat it as much as you want… all you change in that floor will be repeated in the rest of them… didn’t I tell you that it was EASY???… Let’s stop saying nonsense and check it out!

    torres03

    torres04

    Now let’s texture it!. As this is not an architectural model, this is just a building we want to visualize in our 3D scenery (now you know something else about geovisualization, nothing to do with Architecture as you can deduce from it)… we have just used a few textures (less than 5, more than 2…a few! I told you!).

    torres05

    torres06

    torres07

    Now that we have just added textures all we have to do is clicking on ‘place model‘ in our SU:

    torres08

    And finally switching to our GE to check it out…

    torres09

    torres10

    Exactly georreferenced at 40°24’21.08″ N – 3°37’30.22″ W…

    Do you like it?. It’s not that difficult isn’t it?. Do you dare to do something similar in your country… I’m sure yes!.

    Alberto
    GIS Technician.
    BA Geography, MSc GIS.
    Multimedia designer

    albertoconcejal -at- gmail.com

    Modeling from scratch. Geovisualization live!

    2009/07/29

    This is what we first have, a low resolution image taken from Google Earth (GE) visualization engine. This area is a small town within La Rioja, NE of Spain, about 300 km from Madrid. The town is called Muro en Cameros.

    muroencameros_00

    First of all we have to find a better resolution imagen beacouse is absolutely impossible geting the shapes of the buildings without a better one… I find it in the SIGPAC website (you can find a link by your right side->).

    MuroEnCameros

    Let’s see the difference between these two scenaries…

    Before:

    muroencameros_01

    After:

    muroencameros_02

    Now, Let’s start modelling!!!!!. We open our Google Sketch-up (SU)…

    muroencameros_03

    We should clic on this icon to get our current GE view… Very easy as you can see… 

    muroencameros_04

    Now let’s start modelling… Isn’t it easy?????.

    muroencameros_05

    we will check it very soon!

    Alberto

    albertoconcejal-at-gmail.com

    Optimización Servicio Mapas. ArcGIS. ArcSDE

    2009/07/27

    image044image046

    image048image050

    image052image054

    image056

    Trabajo con componentes 3D para incrementar la producción. Google Sketch-up.

    2009/07/13

    image123

    Modelado de ‘lowpols’ para su inclusión en grandes escenarios 3D de ciudades españolas.

    2009/07/13

    image105