[gdal-dev] GDAL Driver for MongoDB

2014-08-21 Thread Zhang, Shuai
Hi there,

I wrote a GDAL driver for mongodb, and uploaded it in the 
github. Feel free to grab and 
use the driver.

Just let me know if you have any questions or suggestions.
Thanks,
shuai
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

[gdal-dev] Cygwin x86_64 complie gdal-1.11.0 fail

2014-09-10 Thread Zhang, Shuai
Hi there,

I think I just found a bug when I tried to compile gdal-1.11.0 using cygwin in 
my laptop. it returns a fail info as below. I did a little search and found 
that setmod function is no longer supported by the cygwin. it is said that this 
kind of problem can only seen in x86_64 platform and can walk around by include 
. 

hope anyone get a better idea~

yours,
Hanson

see: https://cygwin.com/ml/cygwin/2010-09/msg00267.html

/home/Hanson/gdal-1.11.0/frmts/o/.libs/egif_lib.o: In function 
`EGifOpenFileHandle':
/home/Hanson/gdal-1.11.0/frmts/gif/giflib/egif_lib.c:137: undefined reference 
to `setmode'
/home/Hanson/gdal-1.11.0/frmts/gif/giflib/egif_lib.c:137:(.text+0x4f7): 
relocation truncated to fit: R_X86_64_PC32 against undefined symbol `setmode'
collect2: error: ld returned 1 exit status
GNUmakefile:41: recipe for target 'libgdal.la' failed
make[1]: *** [libgdal.la] Error 1
make[1]: Leaving directory '/home/Hanson/gdal-1.11.0'
GNUmakefile:50: recipe for target 'check-lib' failed
make: *** [check-lib] Error 2
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


[gdal-dev] GSoC proposal looking for mentors and suggestions

2014-03-19 Thread Zhang, Shuai
Hi All,

I think i need a mentor working with me and help me make gdal under mongodb 
support.
Below is the proposal i wrote, hopefully you find it worth a trial.

Thanks,
shuai


Title: OGR Driver for MongoDB

Short description:
MongoDB, a document database that provides high performance, high availability, 
and easy scalability, can be a good platform for storing extremely large 
spatial datasets, to support high performance geo-computation and real-time 
spatial analysis in a large scale.This project aims at developing a OGR Driver 
for MongoDB to help applications or softwares based on GDAL, such QGIS, 
Geoserver, Mapserver, and so on, read & write the spatial data in it, and thus 
enable the Open Source GIS Ecosystem powered by the advanced NoSQL database.

Describe your idea
1. Introduction
MongoDB,  a document database that provides high performance, high 
availability, and easy scalability, can be a good platform for storing 
extremely large spatial datasets, to support high performance geo-computation 
and real-time spatial analysis in a large scale. Yet, there is little attention 
so far that GIS fields pay to make most of its strength. This project aims at 
developing a OGR Driver for MongoDB to help applications or softwares based on 
GDAL read & write the spatial data in it, and thus enable the Open Source GIS 
Ecosystem powered by the advanced NoSQL database.

 2. Background
Since we are living in the era of big data, tools and equipment today for 
capturing spatial data both at the mega-scale and the milli-scale are just 
dreadful. The magnitude of this data volume is well beyond the capability of 
any mainstream geographic information systems. Yet, we, GIS fields, have no 
off-the-shelf solutions to manage these massive spatial data. Relational 
spatial databases have taken in charge for decades but now the situation seems 
a little different.

A computing pattern shift can be seen throughout the IT industry in recent 
years and GIS would be no exception. Especially, data analytics may not be 
achievable within a reasonable amount of time without resorting to 
high-performance computing strategies. However, relational spatial databases 
are kind of slow to support these high-performance computing scenarios, and 
often lack of flexible scalability to handle a growing amount of work in a 
capable manner.

Fortunately, there are several groups trying to address the problem, and 
MongoDB is an apparent leader in this direction. MongoDB, which has native 
support for maintaining geospatial data, using a document-oriented model, lies 
in fifth place in the DB-Engines Ranking of database management systems classed 
according to popularity and the highest rated non-relational system. From 
version 2.4 (released on March 19, 2013), MongoDB introduces support for a 
subset of GeoJSON geometries including basic shapes like points, linestrings, 
polygons. And quite a number of partners related with big data, NoSQL, cloud, 
mobile and high performance computing join the MongoDB ecosystem. Foursquare is 
featured one of them which benefits from MongoDB’s support for geospatial 
indexing, allowing it to easily query for large location-based data.

3. The idea
MongoDB employs GeoJSON to store spatial data and concurrently GDAL supports 
for access to features encoded in GeoJSON format, which can be reusable. This 
project is trying to implement a MongoDB Driver according to the OGR format 
driver interfaces with subclasses of OGRSFDriver, OGRDataSource and OGRLayer, 
and registered with the OGRSFDriverRegistrar at runtime, so that GDAL may use 
MongoDB as a datasource to access large scale spatial data.

4. Project plan (detailed timeline: how do you plan to spend your summer?)
The first thing in the list is to design the structure inside of MongoDB 
spatial database. In the context of OGR data model, we got Datasource, Layer 
and Feature, so accordingly every database in MongoDB is regarded as a 
Datasource, and the Collections within should be treated as Layers, thus every 
Document as a Feature. PostGIS and other spatial databases often harness some 
system tables to maintain the metadata, but since MongoDB is schema free 
metadata such as spatial reference can be stored within the particular Layer, 
in this case a Collection.

The most important part of a data format driver is to define how to read and 
write the data format in the specific driver, especially the Open and Create 
method in the Datasource Class. As MongoDB organizes its spatial data in 
GeoJSON model, the GeoJSON driver already supported by current GDAL can be 
reused to code or decode the GeoJSON fetched from MongoDB database. Therefore, 
there would be totally four files to implement, including ogr_mongo.h, 
ogrmongodriver.cpp, ogrmongodatasource.cpp, and ogrmongolayer.cpp.

Test Plan
[1] After the MongoDB Driver is compiled into the OGR framework, the utility 
ogr2ogr can be used as the test program to import and output spatial data 

[gdal-dev] New OGR Driver for MongoDB

2014-04-30 Thread Zhang, Shuai
Hi there,

I wrote a ogr driver for mongodb and wish to contribute to the community.
but I'm not sure where to start and how to do it.
Is there anyone who can give me a hand or some guidance about it?
it will be terrific if you know geojson driver or couchdb driver well,
so that we may have discussions on the code level.

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

Re: [gdal-dev] New OGR Driver for MongoDB

2014-05-22 Thread Zhang, Shuai
Hey Nicol,

you are right, you should put the folder in the  'ogr/ogrsf_frmts' directory .
But the parameters set to compile the driver into gdal/ogr can be a little bit 
complicated.
You could find some clues on "OGR Driver Implementation Tutorial", 
but you still need to handle the mongodb lib things.

if you do not want to bother, attached are a version which could run on windows 
platform. 
in the nmake.opt file, set MONGO Library to your path. i think it will work.

just let me know.
and sorry I haven't make everything ready to use.

yours,
shuai

From: Nicol Hermann [mapser...@geoworld.de]
Sent: Wednesday, May 21, 2014 3:08 PM
To: Zhang, Shuai
Subject: Re: [gdal-dev] New OGR Driver for MongoDB

Hello shuai,

me again.
I checked out the Mongo driver from the Git repository but have some
trouble which steps are necessary to include it into the GDAL trunk.
Can you please provide me some hints.
I assume I have to copy the 'mongo' directory to 'ogr/ogrsf_frmts',
right?
Anything to consider to have it available as 'configure' option?

Thanks for your assistance
Nicol


Am Montag, den 19.05.2014, 21:12 + schrieb Zhang, Shuai:
> Hi Nicol,
>
> Great you are interested.
> I opened up a ticket for this project, as you may find here: 
> http://trac.osgeo.org/gdal/ticket/5453
> you may also find the source code in my github 
> https://github.com/geosky/mongodb-gdal-driver
> glad if you could join in the mongogis group i set up in the github, we may 
> have some discusses there.
>
> thanks,
> shuai
> ____
> From: Nicol Hermann [mapser...@geoworld.de]
> Sent: Monday, May 19, 2014 12:22 PM
> To: Zhang, Shuai
> Subject: Re: [gdal-dev] New OGR Driver for MongoDB
>
> Hello Shuai,
>
> I saw your post about the Mongo driver in the GDAL mailing list.
> Is the driver you wrote for OGR already available somewhere?
> Did you open up a ticket like Kyle recommended?
> If so it would be great if you could share the ticket number with me.
> Thank you very much.
> Nicol
>
>
> Am Mittwoch, den 30.04.2014, 13:55 + schrieb Zhang, Shuai:
> > Hi there,
> >
> >
> > I wrote a ogr driver for mongodb and wish to contribute to the
> > community.
> > but I'm not sure where to start and how to do it.
> > Is there anyone who can give me a hand or some guidance about it?
> > it will be terrific if you know geojson driver or couchdb driver
> > well,
> > so that we may have discussions on the code level.
> >
> >
> > Thanks,
> > Shuai
> > ___
> > gdal-dev mailing list
> > gdal-dev@lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/gdal-dev
>
>


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