← Back to team overview

dhis2-devs team mailing list archive

Re: Linux/Cygwin shell scripts for simplifying admin layers

 

Thanks, this is helpful, I should indeed have read the GIS user manual, was
not aware that you had put this in there, and also somehow had the mistaken
impression ogr did not output geojson.

Do you also have a solution for the simplification/generalization without
going via postgis and geoserver?

I suppose I could do shp2pgsql -> simplify -> pgsql2shp -> ogr2ogr ->
geojson (thus eliminating the need for Geoserver).

As for FME, I have not looked at how to include it in scripts (and we only
have one license for it).

Knut

On Tue, Dec 15, 2009 at 11:54 AM, Jason Pickering <
jason.p.pickering@xxxxxxxxx> wrote:

> Hi Knut,
>
> This procedure has already been described briefly in the GIS user
> manual. Take a look there for a start, included below for your
> convenience.
>




> "1.1.2. Production of GeoJSON files with GDAL
>
> GDAL is a multi-platform toolkit for the manipulation of geographical
> data. It is freely available for a wide-range of platforms at
> http://gdal.org
>
> Production of GeoJSON files are straightforward with GDAL. Just
> execute (on Windows)
>
> ogr2ogr.exe -f "GeoJSON" dst_datasource_name src_datasource_name
>
> or on Linux
>
> ogr2ogr -f "GeoJSON"dst_datasource_name src_datasource_name
>
> Replace dst_datasource_name with the path to the destination
> geographical data file (following the naming convention described
> above) and src_datasource_name with the source geographical data file.
> Take note that you may need to specify input and output coordinate
> systems as described above. "
>

Can this be extended to include the generalization algorithm?


> Also, FME will do this job very nicely.
>

True of course, but

> Regards,
> Jason
>
>
> On 12/15/09, Knut Staring <knutst@xxxxxxxxx> wrote:
> > On Tue, Dec 15, 2009 at 11:38 AM, Jason Pickering <
> > jason.p.pickering@xxxxxxxxx> wrote:
> >
> >> Any reason you would not do this with GDAL (ogr2ogr) directly?
> >
> >
> > Maybe lack of knowledge? Can you enlighten me?
> >
> > Knut
> >
> >
> >>
> >>
> >> On 12/15/09, Knut Staring <knutst@xxxxxxxxx> wrote:
> >> > I am working on scripts to import shapefiles to PostGIS, simplify
> them,
> >> and
> >> > export to GeoJSON using Geoserver:
> >> >
> >> > http://www.openhealthconsortium.org/wiki/doku.php?id=importing_to_ohm
> >> >
> >>
> >
> >
> >
> > --
> > Cheers,
> > Knut Staring
> >
>



-- 
Cheers,
Knut Staring

Follow ups

References