Re: [gdal-dev] ogr shapefile viewer

2011-01-06 Thread Mateusz Loskot

On 06/01/11 16:53, Mohammed Rashad wrote:


Anyone plea se provide a source code of just a simple shapefile viewer
in C/C++ or python


http://www.codeproject.com/KB/openGL/RenderSHP.aspx

Best regards,
--
Mateusz Loskot, http://mateusz.loskot.net
Charter Member of OSGeo, http://osgeo.org
Member of ACCU, http://accu.org
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] ogr shapefile viewer

2011-01-06 Thread Mohammed Rashad
i checked it. Its not working properly and uses openGL

On Thu, Jan 6, 2011 at 10:31 PM, Mateusz Loskot mate...@loskot.net wrote:

 On 06/01/11 16:53, Mohammed Rashad wrote:


 Anyone plea se provide a source code of just a simple shapefile viewer
 in C/C++ or python


 http://www.codeproject.com/KB/openGL/RenderSHP.aspx

 Best regards,
 --
 Mateusz Loskot, http://mateusz.loskot.net
 Charter Member of OSGeo, http://osgeo.org
 Member of ACCU, http://accu.org




-- 
Rashad
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] ogr shapefile viewer

2011-01-06 Thread Mateusz Loskot

On 06/01/11 16:58, Mohammed Rashad wrote:

i checked it. Its not working properly and uses openGL


You didn't mention it can not be based on OpenGL or any other rendering 
API. No idea what you mean not working properly,


The code provides good example on how to read vectors from Shapefile
and pass to renderer. Just translate it to your renderer, Windows GDI, 
GTK+, whatever.
If you want to use OGR, but not Shapelib, learn from OGR tutorial and do 
the same thing.


Best regards,
--
Mateusz Loskot, http://mateusz.loskot.net
Charter Member of OSGeo, http://osgeo.org
Member of ACCU, http://accu.org
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] ogr shapefile viewer

2011-01-06 Thread Mohammed Rashad
On Thu, Jan 6, 2011 at 10:45 PM, Mateusz Loskot mate...@loskot.net wrote:


 On 06/01/11 17:06, Mohammed Rashad wrote:

 when the window resize the size of shapefile is also changed. by not
  working I mean its not displaying shapefile correctly.


 This is a very simple example, it does not have to handle all UI events,
 react on windows resize, etc.
 I can't believe size of Shapefile does change. It can't change as it's a
 file on disk, so unless you edit vectors in file, its size never changes.
 You probably mean size of vectors displayed. Again, it's simple example,
 loads Shapefile, creates a window, draws vectors from Shapefile in this
 window. That's it.

 You wanted simple, this is simple.


  can you point me to some other example with any api OpenGL also no
 problem


 Just google, there is plenty.

 Instead of looking for code, I'd rather suggest to sit down and think
 what you need. I assure you, all you need you have in OGR tutorial on
 gdal.org/ogr website. The only thing you need more is to pass vector
 data/point to rendering API you want to use.

 yes Mateusz Loskot, i need this part. passing the vector data/point to a
rendering API.


Anyone can provide a simple example other than
http://www.codeproject.com/KB/openGL/RenderSHP.aspx

 p.s. please, do not reply privately to folks from mailing lists,
 reply to mailing list.


 Best regards,
 --
 Mateusz Loskot, http://mateusz.loskot.net
 Charter Member of OSGeo, http://osgeo.org
 Member of ACCU, http://accu.org




-- 
Rashad
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] ogr shapefile viewer

2011-01-06 Thread Christopher Barker

On 1/6/11 9:19 AM, Mohammed Rashad wrote:

Instead of looking for code, I'd rather suggest to sit down and think
what you need. I assure you, all you need you have in OGR tutorial
on gdal.org/ogr http://gdal.org/ogr website. The only thing you
need more is to pass vector data/point to rendering API you want to use.

yes Mateusz Loskot, i need this part. passing the vector data/point to a
rendering API.


It's still not clear quite what you want. If you just want to look at 
shape files, I'd use an off-the-shelf desktop GIS, there are lots, QGIS 
is pretty nice.


You can also render shapefiles with mapnik or mapserver -- both are 
highly customizable and produce very nice output.


If you want a library you can embed in your own app, and maybe 
customize, that's a different story.


For Python you could use wxPython and my wx.lib.floatcanvas. It doesn't 
understand shape files, but with OGR reading them, it's very easy to 
throw points, lines and polygons on the canvas, and be able to zoom and 
pan around to look at them.


We've also got the maproom project:

https://bitbucket.org/dhelfman/maproom/overview

It's a bit stalled out now, but will be revived. It is designed to be a 
general purpose lib and application for interactive map data viewing and 
manipulation. It doesn't actually support shape files at the moment, but 
it does use GDAL/OGR and has support for points and polygons, so not 
hard to write a new plugin for shape.


It's also using OpenGL for speedy rendering.

HTH,

-Chris



--
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115   (206) 526-6317   main reception

chris.bar...@noaa.gov
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] ogr shapefile viewer

2011-01-06 Thread Chaitanya kumar CH
Rashad,

I assume you are looking for a simple viewer for non-changing shapefiles.
You can use the GDAL library and the code from the gdal_rasterize utility.

On Thu, Jan 6, 2011 at 11:17 PM, Mohammed Rashad mohammedrasha...@gmail.com
 wrote:



 On Thu, Jan 6, 2011 at 11:09 PM, Christopher Barker chris.bar...@noaa.gov
  wrote:

 On 1/6/11 9:19 AM, Mohammed Rashad wrote:

Instead of looking for code, I'd rather suggest to sit down and think
what you need. I assure you, all you need you have in OGR tutorial
on gdal.org/ogr http://gdal.org/ogr website. The only thing you

need more is to pass vector data/point to rendering API you want to
 use.

 yes Mateusz Loskot, i need this part. passing the vector data/point to a
 rendering API.


 It's still not clear quite what you want. If you just want to look at
 shape files, I'd use an off-the-shelf desktop GIS, there are lots, QGIS is
 pretty nice.

 You can also render shapefiles with mapnik or mapserver -- both are highly
 customizable and produce very nice output.

 If you want a library you can embed in your own app, and maybe customize,
 that's a different story.

 I need a c++ library to just display an OGR shapefile. i need to embed this
 C++ library in my application that what I need. Is that clear? If you need
 any further details i will provide.


 For Python you could use wxPython and my wx.lib.floatcanvas. It doesn't
 understand shape files, but with OGR reading them, it's very easy to throw
 points, lines and polygons on the canvas, and be able to zoom and pan around
 to look at them.

 We've also got the maproom project:

 https://bitbucket.org/dhelfman/maproom/overview

 It's a bit stalled out now, but will be revived. It is designed to be a
 general purpose lib and application for interactive map data viewing and
 manipulation. It doesn't actually support shape files at the moment, but it
 does use GDAL/OGR and has support for points and polygons, so not hard to
 write a new plugin for shape.

 It's also using OpenGL for speedy rendering.

 HTH,

 -Chris



 --
 Christopher Barker, Ph.D.
 Oceanographer

 Emergency Response Division
 NOAA/NOS/ORR(206) 526-6959   voice
 7600 Sand Point Way NE   (206) 526-6329   fax
 Seattle, WA  98115   (206) 526-6317   main reception

 chris.bar...@noaa.gov




 --
 Rashad

 ___
 gdal-dev mailing list
 gdal-dev@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/gdal-dev




-- 
Best regards,
Chaitanya kumar CH.
/tʃaɪθənjə/ /kʊmɑr/
+91-9494447584
17.2416N 80.1426E
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev