[gdal-dev] gdal_contour attribute field not populated for polygons outputs

2019-10-15 Thread G. Allegri
Dear list,
I'm using gdal_contour with a single band (float) raster. It works as
expected for the default linestring outputs but when I set the "-p" option
the attribute field is created but it's empty.

This is the command I run:

>gdal_contour -b 1 -a val -i 10.0 -p -f "ESRI Shapefile" .tif
.shp

Is this a known issue or am I doing something wrong?
Thanks,
Giovanni
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] gdal_contour attribute field not populated for polygons outputs

2019-10-15 Thread Even Rouault
On mardi 15 octobre 2019 12:57:16 CEST G. Allegri wrote:
> Dear list,
> I'm using gdal_contour with a single band (float) raster. It works as
> expected for the default linestring outputs but when I set the "-p" option
> the attribute field is created but it's empty.
> 
> This is the command I run:
> >gdal_contour -b 1 -a val -i 10.0 -p -f "ESRI Shapefile" .tif
> 
> .shp
> 
> Is this a known issue or am I doing something wrong?

https://gdal.org/programs/gdal_contour.html :

"""

-a 
Provides a name for the attribute in which to put the elevation. If not 
provided no elevation attribute is attached. Ignored in polygonal contouring 
(-p) mode.
"""

Use -amin / -amax

Even

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] gdal_contour attribute field not populated for polygons outputs

2019-10-15 Thread G. Allegri
Thanks a lor Even, I missed that line ;)
Works perfectly with -amin / -amax

Giovanni

Il giorno mar 15 ott 2019 alle ore 13:02 Even Rouault <
even.roua...@spatialys.com> ha scritto:

> On mardi 15 octobre 2019 12:57:16 CEST G. Allegri wrote:
> > Dear list,
> > I'm using gdal_contour with a single band (float) raster. It works as
> > expected for the default linestring outputs but when I set the "-p"
> option
> > the attribute field is created but it's empty.
> >
> > This is the command I run:
> > >gdal_contour -b 1 -a val -i 10.0 -p -f "ESRI Shapefile"
> .tif
> >
> > .shp
> >
> > Is this a known issue or am I doing something wrong?
>
> https://gdal.org/programs/gdal_contour.html :
>
> """
>
> -a 
> Provides a name for the attribute in which to put the elevation. If
> not
> provided no elevation attribute is attached. Ignored in polygonal
> contouring
> (-p) mode.
> """
>
> Use -amin / -amax
>
> Even
>
> --
> Spatialys - Geospatial professional services
> http://www.spatialys.com
>
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev

[gdal-dev] Adding The DWG Driver to ogr2ogr?

2019-10-15 Thread Brandon Biggs
Hello,

I'm wondering how to build custom packages to use in my Conda installation?

In particular, I would like a GWD driver for ogr2ogr.

I would like the AutoCAD DWG driver, 
but it looks as if it is not built in my installation.

It looks as if I will need to edit the make file and run a custom build to get 
the driver. I searched the docs and Github for building instructions, but don't 
see any.

The instructions for "hand editing" the GNUmakefile don't say what to change, 
and I'm not exactly sure where "paths" is and what to do with it. The fact I'm 
supposed to build the driver as a plugin gives me hope though that I can find 
the built plugin somewhere and just insert it into some plugins folder in my 
Conda build.

What would be the best steps from here?

Thank you,


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

Re: [gdal-dev] Adding The DWG Driver to ogr2ogr?

2019-10-15 Thread Alan Snow
Hi Brandon.

I would recommend opening up an issue on the conda-forge feedstock:
https://github.com/conda-forge/gdal-feedstock

Best,
Alan

On Tue, Oct 15, 2019 at 4:00 PM Brandon Biggs  wrote:

> Hello,
>
> I'm wondering how to build custom packages to use in my Conda installation?
>
> In particular, I would like a GWD driver for ogr2ogr.
>
> I would like the AutoCAD DWG driver
> , but it looks as if it is not
> built in my installation.
>
> It looks as if I will need to edit the make file and run a custom build to
> get the driver. I searched the docs and Github for building instructions,
> but don't see any.
>
> The instructions for "hand editing" the GNUmakefile don't say what to
> change, and I'm not exactly sure where "paths" is and what to do with it.
> The fact I'm supposed to build the driver as a plugin gives me hope though
> that I can find the built plugin somewhere and just insert it into some
> plugins folder in my Conda build.
>
> What would be the best steps from here?
>
> Thank you,
>
>
> ___
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev



-- 
Alan Snow
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] Adding The DWG Driver to ogr2ogr?

2019-10-15 Thread Brandon Biggs
Hello,
I opened an issue:
https://github.com/conda-forge/gdal-feedstock/issues/339

Please let me know if there is something else I can do.
Thank you,


Brandon Biggs
Engineer

Smith-Kettlewell Eye Research Institute
Office: 415-345-2130
Cell: 650-833-9394


From: Alan Snow 
Sent: Tuesday, October 15, 2019 5:06 PM
To: Brandon Biggs 
Cc: gdal-dev@lists.osgeo.org 
Subject: Re: [gdal-dev] Adding The DWG Driver to ogr2ogr?

Hi Brandon.

I would recommend opening up an issue on the conda-forge feedstock: 
https://github.com/conda-forge/gdal-feedstock

Best,
Alan

On Tue, Oct 15, 2019 at 4:00 PM Brandon Biggs 
mailto:brandon.bi...@ski.org>> wrote:

Hello,

I'm wondering how to build custom packages to use in my Conda installation?

In particular, I would like a GWD driver for ogr2ogr.

I would like the AutoCAD DWG driver, 
but it looks as if it is not built in my installation.

It looks as if I will need to edit the make file and run a custom build to get 
the driver. I searched the docs and Github for building instructions, but don't 
see any.

The instructions for "hand editing" the GNUmakefile don't say what to change, 
and I'm not exactly sure where "paths" is and what to do with it. The fact I'm 
supposed to build the driver as a plugin gives me hope though that I can find 
the built plugin somewhere and just insert it into some plugins folder in my 
Conda build.

What would be the best steps from here?

Thank you,


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


--
Alan Snow
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev

[gdal-dev] Converting 3D Polygons to 2D Polygons?

2019-10-15 Thread Brandon Biggs
Hello,

Is there some way to convert 3D objects to 2D polygons using ogr2ogr?

I have a large file with lots of polygons with 0 as the z coordinate. So the 
point would look like [1,2,0].

I would like it to be: [1,2].

Thanks,


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

Re: [gdal-dev] Converting 3D Polygons to 2D Polygons?

2019-10-15 Thread Eli Adam
On Tue, Oct 15, 2019 at 6:12 PM Brandon Biggs  wrote:

> Hello,
>
> Is there some way to convert 3D objects to 2D polygons using ogr2ogr?
>
>
Did you already try, -dim XY

More details here,
https://gdal.org/programs/ogr2ogr.html#ogr2ogr

What happened if you tried -dim XY?

Best regards, Eli

I have a large file with lots of polygons with 0 as the z coordinate. So
> the point would look like [1,2,0].
>
> I would like it to be: [1,2].
>
> Thanks,
>
>
> ___
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev