Bug 224004 - graphics/gdal: Too many necessary options disabled by default
Summary: graphics/gdal: Too many necessary options disabled by default
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Sunpoet Po-Chuan Hsieh
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-30 21:49 UTC by Loïc Bartoletti
Modified: 2020-05-23 12:42 UTC (History)
5 users (show)

See Also:
lbartoletti: maintainer-feedback-


Attachments
gdal-2.4.1_2 add flavors for gdal (6.52 KB, patch)
2019-05-08 19:04 UTC, Loïc Bartoletti
no flags Details | Diff
GDAL 3 with flavors. (15.96 KB, patch)
2020-02-12 18:18 UTC, Loïc Bartoletti
no flags Details | Diff
GDAL 3 with options_default (748 bytes, patch)
2020-02-19 20:27 UTC, Loïc Bartoletti
no flags Details | Diff
gdal 3.1.0_2 (1.17 KB, patch)
2020-05-23 12:42 UTC, Loïc Bartoletti
lbartoletti: maintainer-approval?
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Loïc Bartoletti freebsd_committer 2017-11-30 21:49:53 UTC
Hi,

For my personal case, I think that gdal have to enable by default (for the pkg) some necessary options:

Very strong:
SQLITE: used for geopackage new lingua franca formats for GIS (by default in QGis 3)
CURL: for all web services
EXPAT: for spreadsheet (excel / openoffice) and openstreetmap
FREEXL: old excel spreadsheet
GEOS: used by other and perform some operations


Strong:
PGSQL : most GIS tools install postgresql

Soft:
ECW 

How do you feel about that?

Regards.

Loïc
Comment 1 Sunpoet Po-Chuan Hsieh freebsd_committer 2017-12-09 17:09:13 UTC
There are many different ways to use this port and each of them requires different dependencies. I prefer to keep a minimal dependency for the default option and add more options for people who have different needs to build this port themselves. I guess this problem will be solved when subpackage becomes available.
Comment 2 Loïc Bartoletti freebsd_committer 2018-01-16 13:36:33 UTC
Hi,

I can understand your point of view, but the problem is that it causes problems for the use of GIS clients (QGis, Grass and maybe SAGA) that are all based on this library.

I don't think it's too big to install these dependencies (especially those marked as very strong)

Regards.
Comment 3 Loïc Bartoletti freebsd_committer 2018-01-17 18:18:58 UTC
With flavors, can we imagine to have little (like today), mid (my suggestion), full (all options) flavors?
Comment 4 Rainer Hurling 2018-01-17 18:41:52 UTC
(In reply to lbartoletti from comment #2)

Speaking as the maintainer of graphics/qgis and math/saga I would like to vote for a as much as possible and useful enabled set of (strong) options. Option PGSQL is very important also.

Applications like QGIS and SAGA do realize much of there functionality via helper programs, primarily GDAL functions.

Thanks and best wishes,
Rainer
Comment 5 Loïc Bartoletti freebsd_committer 2018-05-23 06:47:24 UTC
Any news?

I just checked other systems and the proposed dependencies are similar.

Except qgis, grass and saga, this is all GIS tools that need more default options in gdal.

Is there any chance we can review this for gdal 2.3.0?
Comment 6 Loïc Bartoletti freebsd_committer 2018-05-23 06:52:04 UTC
Also, if you're afraid about dependencies, you can see that some of this are already required by other installed GIS software, just use ports-mgmt/portgraph or ports-mgmt/py-skog to see it.

Thank you
Comment 7 Loïc Bartoletti freebsd_committer 2019-05-08 12:57:04 UTC
I'm back :)

Since QGIS 3, geopackage is the default format. I patched upstream qgis to avoid some error and crash since sqlite is not enabled in our default GDAL.

QGIS require also MDAL (internal, but I plan to create a port of it) which require for some case that GDAL have NetCDF/HDF5 enabled too.

And now, math/pdal 1.9.0 require that GEOS is enabled in GDAL.

I will prepare a patch with this options.
Comment 8 Loïc Bartoletti freebsd_committer 2019-05-08 19:04:56 UTC
Created attachment 204276 [details]
gdal-2.4.1_2 add flavors for gdal

Proposal patch with flavors

(including patch from #237298)
Comment 9 Loïc Bartoletti freebsd_committer 2019-05-08 19:08:46 UTC
My proposal:

default:
astro/libosmium
databases/grass7
databases/postgis20
databases/postgis22
databases/postgis23
databases/postgis24
databases/postgis25
graphics/R-cran-rgdal
graphics/gmt
graphics/gmt5
graphics/mapcache
graphics/mapnik
graphics/mapserver
graphics/osgearth
graphics/p5-Geo-GDAL
graphics/py-fiona
graphics/py-gdal
graphics/qgis
graphics/qgis-ltr
math/R-cran-sf
math/pdal
math/saga

lite:
astro/merkaartor
astro/qmapshack
cad/sumo
graphics/openorienteering-mapper
graphics/cloudcompare
games/flightgear-terragear
Comment 10 kunda 2019-06-21 14:20:39 UTC
Just wondering, should I open another ticket to create a separate port for gdal 3.0? https://www.osgeo.org/foundation-news/gdal-3-0-0-is-released/
Comment 11 Loïc Bartoletti freebsd_committer 2020-02-12 18:18:04 UTC
Created attachment 211597 [details]
GDAL 3 with flavors.

Here's the update. It is becoming more and more critical for some applications, including qgis, saga and postgis.
Comment 12 Loïc Bartoletti freebsd_committer 2020-02-12 18:19:27 UTC
I hope I've updated all ports. Please let me know.
Comment 13 Loïc Bartoletti freebsd_committer 2020-02-12 18:20:47 UTC
Dmitry amdmi3@ what's your preference for osg? Thanks
Comment 14 Dmitry Marakasov freebsd_committer 2020-02-12 21:16:01 UTC
> GDAL 3 with flavors.

I don't think you may use flavors here as these conflict with each other (e.g. install same files) and different packages depending on different gdal flavors will lead to inability to install such packages together.

IMO the key problem is here:

> I prefer to keep a minimal dependency for the default option and add more options for people who have different needs to build this port themselves.

As long as we want FreeBSD to be useful general purpose system, we must not require users to build anything from ports, as this requires extra time, CPU, diskspace, leads to downtime on upgrade and possible build problems, so we want binary packages to have most functionality enabled by default, unless that pulls too heavy dependencies. I've always though this was the rule of thumb for ports.

So my opinion is that the options mentioned in the first message should be enabled instead (except for ECW of course, for it's restricted).
Comment 15 Loïc Bartoletti freebsd_committer 2020-02-18 13:16:45 UTC
(In reply to Dmitry Marakasov from comment #14)

I'm agree with you. sunpoet@ after years what's your opinion? 

OPTIONS_DEFAULT= CURL EXPAT FREEXL GEOS HDF5 JASPER \
			KML LIBXML2 NETCDF OPENJPEG PCRE PGSQL SFCGAL \
			SPATIALITE SQLITE WEBP XERCES ZSTD POPPLER

is acceptable?
Comment 16 Rainer Hurling 2020-02-18 15:40:20 UTC
(In reply to Loïc Bartoletti from comment #15)

Hope it is ok that I also answer here ;)

These options would be fine for our use cases with postgis, openjump, saga and qgis.

Thanks Loïc, for your ongoing work.
Comment 17 Loïc Bartoletti freebsd_committer 2020-02-19 20:27:16 UTC
Created attachment 211768 [details]
GDAL 3 with options_default
Comment 18 Sunpoet Po-Chuan Hsieh freebsd_committer 2020-03-01 11:12:35 UTC
(In reply to Dmitry Marakasov from comment #14)
(In reply to Loïc Bartoletti from comment #15)
(In reply to Rainer Hurling from comment #16)

I plan to enable these options by default:
CURL EXPAT FREEXL GEOS JASPER LIBXML2 OPENJPEG PCRE PGSQL POPPLER WEBP ZSTD

Except ECW, it covers all options in comment #0.
Comment 19 Rainer Hurling 2020-03-01 16:55:41 UTC
(In reply to Sunpoet Po-Chuan Hsieh from comment #18)

Hi Sunpoet,

Is there any reason not to enable by default SPATIALITE, SQLITE, and SFCGAL? GDAL functionality enabled by these options is really needed by PostGIS and QGIS.

Many thanks for clarification in advance,
Rainer
Comment 20 Loïc Bartoletti freebsd_committer 2020-03-02 06:07:00 UTC
Thank you!

I want to emphasize these options because they are really useful.

XERCES : mandatory for GML export
NETCDF : mandatory for Mesh in QGIS (and part of mdal library)
Spatialite/Sqlite : mandatory for GeoPackage (new lingua franca formats) and spatialite
KML : mandatory for libmkl (.kml and .kmz : google earth/map exchange)


SFCGAL : as you want since we're having discussions about making this build optional in postgis and its status, due to problems compiling with CGAL during upgrades. It is almost only on FreeBSD that SFCGAL/CGAL does not pose a packaging problem.

Thanks again
Comment 21 Loïc Bartoletti freebsd_committer 2020-04-29 10:17:38 UTC
Hi Sunpoet,

I have some free (CPU) time next days. I can give it a try.

Loïc
Comment 22 Loïc Bartoletti freebsd_committer 2020-05-23 12:42:59 UTC
Created attachment 214779 [details]
gdal 3.1.0_2

Newest version.