[OSGeoJapan-discuss] Integration of Japanese GIS formats into mainline GDAL ?

Even Rouault even.rouault @ spatialys.com
2015年 5月 1日 (金) 02:59:37 PDT


Hi Hiroo,

OK I let you take the necessary time sort that out. Being completely an 
outsider and not having the "big picture" of the existing formats and how 
historic or up-to-date they are, it is also not clear to me which drivers 
might be of general interest for the Japanese community, as opposed to the 
ones which would really be of very restricted scope of interest.

(Just a word of caution: as those archives are public, and the new drivers are 
included in a distribution of source code that is labelled as X/MIT in its 
LICENSE.TXT file, people could in good faith assume that all the files, 
including the extra drivers are also X/MIT)

I tried the FGD ogr driver on the file 
https://github.com/msherry/PyXB-1.1.4/blob/master/examples/unicode_jp/data/shift_jis/FG-
GML-13-RailCL25000-20080331-0001.xml
(found by googling FG-GML)

It is not recognized by the driver. Looking more closely, the driver seems to 
expect a <GI> element that isn't found in that file. It appears that there are 
several versions of FGD GML, right ? The above file is apparently v3 (since 
there's a v3 schema next to it). Perhaps the driver is v4 (or a previous 
version) ? I tried to remove the test for the presence of <GI> but it crashes 
later during parsing of dates, apparently not liking the <gml:timePosition> 
element within <lfSpanFr>

I found this project : http://mizutuu.github.io/jpgisgmlv4togml-converter/  / 
https://github.com/mizutuu/jpgisgmlv4togml-converter
It includes the schema for FG-GML v4 and I can't see any reference to the <GI> 
element in it either.
With some trickery related to encoding conversion, I managed to use that 
project to produce a standard GML file that the OGR GML driver handles well :

cat FG-GML-13-RailCL25000-20080331-0001.xml | iconv --from-code=shift-jis --
to-code=utf-8 | sed "s/Shift_JIS/UTF-8/" | python jpgisgml2gml.py > out.gml

I've also found this site http://nlftp.mlit.go.jp/ksj-e/ and downloaded a few 
datasets. Those I tried are not handled by the OGR FGD driver. Some of them 
look like GML with a particular application schema. They are unfortunately not 
standard enough for the OGR GML driver to understand them out of the box, 
although I believe it could be tweaked to parse them. Their header look like:

<ksj:Dataset gml:id="A09Dataset" 
xmlns:ksj="http://nlftp.mlit.go.jp/ksj/schemas/ksj-app" 
xmlns:gml="http://www.opengis.net/gml/3.2" 
xmlns:xlink="http://www.w3.org/1999/xlink" xm
lns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="http://nlftp.mlit.go.jp/ksj/schemas/ksj-app KsjAppSchema-
A09-v3_1.xsd">

There's a shapefile next to them, with apparently same content.

So it appears there's a variety of GML-like formats ;-)

Even

> Hi Even,
> 
> I talk to Yamate-san who has been working on those three drivers. He
> explained that each driver has little bit different copy right background
> he need to resolve before he can merge them to the main.
> 
> The first one, FGD driver, which he wrote for a project and he does not
> have control on its copy right. So, he would like to leave it at this
> moment.
> 
> For the second one, FG-GML driver, he wrote it and he owns its copy right
> at this moment. But he said he can release with the licence you suggested.
> 
> The last one, FGD ogr driver, which he also wrote and it is highly possible
> he can release it under the MIT licence. But he need to make sure his
> client can agree on this. So, he said he will contact to his client.
> 
> So, the last two drivers can be merge into the main GDAL driver. It is
> little bit confusing background but I am sure we can sort these out.
> 
> I will let you know when he is ready to work with you.
> 
> Thanks!
> 
> Hiroo
> 
> On Thu, Apr 30, 2015 at 2:26 PM, Hiroo Imaki <hiroo at angeli.org> wrote:
> > Hi Even,
> > 
> > I am not the developer but he and I working at a same company. If he can
> > agree on the license and release his efforts, that would be wonderful for
> > all Japanese data uses.
> > 
> > He hesitates writing his message in English. So, I can be a translator
> > between you guys. I hope no lost in translation!
> > 
> > I will get back to you once I hear from him.
> > 
> > Hiroo
> > 
> > On Thu, Apr 30, 2015 at 10:45 AM, Even Rouault
> > <even.rouault at spatialys.com
> > 
> > > wrote:
> >> Hi,
> >> 
> >> Sorry for writing in English, but I don't unfortunately speak Japanese.
> >> 
> >> I'm one of the GDAL developers.
> >> 
> >> I've noticed that there are "un-official" versions of GDAL floating
> >> around, with
> >> a few drivers for new Japanese-specific formats. I was wondering if
> >> there was a
> >> reason to keep them outside of the official GDAL tree ? Integrating them
> >> into
> >> mainline GDAL would probably make life of Japanese users easier. GDAL
> >> has already support for a lof of national specific formats, mainly in
> >> Europe and
> >> North America. Would be cool for Asia to join in ;-)
> >> 
> >> In a recent discussion thread, the following link is mentionned:
> >>  https://www.dropbox.com/s/4oyhncknavdk2if/gdal110_test.zip
> >> 
> >> I can see that it contains 2 new GDAL drivers ( FGD: Japanese
> >> Fundamental Geographic Data (.xml) & FG-GML :  Japanese Fundamental
> >> Geographic Data GML(.xml) ) and one OGR driver (FGD).
> >> Unfortunatelly there's no author or copyright information in the header
> >> of the
> >> corresponding source files. Would their author(s) be willing to release
> >> them
> >> under the X/MIT license and contribute them to the mainline GDAL project
> >> ? Perhaps some test files to write minimalistic regressions tests would
> >> be useful.
> >> 
> >> Let me know if I can be useful for anything. I can also help for writing
> >> new
> >> drivers if needed.
> >> 
> >> Best regards,
> >> 
> >> Even
> >> 
> >> --
> >> Spatialys - Geospatial professional services
> >> http://www.spatialys.com
> >> _______________________________________________
> >> OSGeoJapan-discuss mailing list
> >> OSGeoJapan-discuss at lists.osgeo.org
> >> http://lists.osgeo.org/mailman/listinfo/osgeojapan-discuss
> > 
> > --
> > Hiroo Imaki
> > Pacific Spatial Solutions, LLC
> > 1523 Chatham Colony Ct.
> > Reston, VA  20190
> > hiroo.imaki at pacificspatial.com
> > http://www.pacificspatial.com
> > http://www.geopacific.org (GIS info site)
> > hiroo at angeli.org (private)

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com


OSGeoJapan-discuss メーリングリストの案内