moving mapnik-scons to trunk
This commit is contained in:
commit
ec999cf543
265 changed files with 4445 additions and 119667 deletions
768
ABOUT-NLS
768
ABOUT-NLS
|
@ -1,768 +0,0 @@
|
|||
Notes on the Free Translation Project
|
||||
*************************************
|
||||
|
||||
Free software is going international! The Free Translation Project is
|
||||
a way to get maintainers of free software, translators, and users all
|
||||
together, so that will gradually become able to speak many languages.
|
||||
A few packages already provide translations for their messages.
|
||||
|
||||
If you found this `ABOUT-NLS' file inside a distribution, you may
|
||||
assume that the distributed package does use GNU `gettext' internally,
|
||||
itself available at your nearest GNU archive site. But you do _not_
|
||||
need to install GNU `gettext' prior to configuring, installing or using
|
||||
this package with messages translated.
|
||||
|
||||
Installers will find here some useful hints. These notes also
|
||||
explain how users should proceed for getting the programs to use the
|
||||
available translations. They tell how people wanting to contribute and
|
||||
work at translations should contact the appropriate team.
|
||||
|
||||
When reporting bugs in the `intl/' directory or bugs which may be
|
||||
related to internationalization, you should tell about the version of
|
||||
`gettext' which is used. The information can be found in the
|
||||
`intl/VERSION' file, in internationalized packages.
|
||||
|
||||
Quick configuration advice
|
||||
==========================
|
||||
|
||||
If you want to exploit the full power of internationalization, you
|
||||
should configure it using
|
||||
|
||||
./configure --with-included-gettext
|
||||
|
||||
to force usage of internationalizing routines provided within this
|
||||
package, despite the existence of internationalizing capabilities in the
|
||||
operating system where this package is being installed. So far, only
|
||||
the `gettext' implementation in the GNU C library version 2 provides as
|
||||
many features (such as locale alias, message inheritance, automatic
|
||||
charset conversion or plural form handling) as the implementation here.
|
||||
It is also not possible to offer this additional functionality on top
|
||||
of a `catgets' implementation. Future versions of GNU `gettext' will
|
||||
very likely convey even more functionality. So it might be a good idea
|
||||
to change to GNU `gettext' as soon as possible.
|
||||
|
||||
So you need _not_ provide this option if you are using GNU libc 2 or
|
||||
you have installed a recent copy of the GNU gettext package with the
|
||||
included `libintl'.
|
||||
|
||||
INSTALL Matters
|
||||
===============
|
||||
|
||||
Some packages are "localizable" when properly installed; the programs
|
||||
they contain can be made to speak your own native language. Most such
|
||||
packages use GNU `gettext'. Other packages have their own ways to
|
||||
internationalization, predating GNU `gettext'.
|
||||
|
||||
By default, this package will be installed to allow translation of
|
||||
messages. It will automatically detect whether the system already
|
||||
provides the GNU `gettext' functions. If not, the GNU `gettext' own
|
||||
library will be used. This library is wholly contained within this
|
||||
package, usually in the `intl/' subdirectory, so prior installation of
|
||||
the GNU `gettext' package is _not_ required. Installers may use
|
||||
special options at configuration time for changing the default
|
||||
behaviour. The commands:
|
||||
|
||||
./configure --with-included-gettext
|
||||
./configure --disable-nls
|
||||
|
||||
will respectively bypass any pre-existing `gettext' to use the
|
||||
internationalizing routines provided within this package, or else,
|
||||
_totally_ disable translation of messages.
|
||||
|
||||
When you already have GNU `gettext' installed on your system and run
|
||||
configure without an option for your new package, `configure' will
|
||||
probably detect the previously built and installed `libintl.a' file and
|
||||
will decide to use this. This might be not what is desirable. You
|
||||
should use the more recent version of the GNU `gettext' library. I.e.
|
||||
if the file `intl/VERSION' shows that the library which comes with this
|
||||
package is more recent, you should use
|
||||
|
||||
./configure --with-included-gettext
|
||||
|
||||
to prevent auto-detection.
|
||||
|
||||
The configuration process will not test for the `catgets' function
|
||||
and therefore it will not be used. The reason is that even an
|
||||
emulation of `gettext' on top of `catgets' could not provide all the
|
||||
extensions of the GNU `gettext' library.
|
||||
|
||||
Internationalized packages have usually many `po/LL.po' files, where
|
||||
LL gives an ISO 639 two-letter code identifying the language. Unless
|
||||
translations have been forbidden at `configure' time by using the
|
||||
`--disable-nls' switch, all available translations are installed
|
||||
together with the package. However, the environment variable `LINGUAS'
|
||||
may be set, prior to configuration, to limit the installed set.
|
||||
`LINGUAS' should then contain a space separated list of two-letter
|
||||
codes, stating which languages are allowed.
|
||||
|
||||
Using This Package
|
||||
==================
|
||||
|
||||
As a user, if your language has been installed for this package, you
|
||||
only have to set the `LANG' environment variable to the appropriate
|
||||
`LL_CC' combination. Here `LL' is an ISO 639 two-letter language code,
|
||||
and `CC' is an ISO 3166 two-letter country code. For example, let's
|
||||
suppose that you speak German and live in Germany. At the shell
|
||||
prompt, merely execute `setenv LANG de_DE' (in `csh'),
|
||||
`export LANG; LANG=de_DE' (in `sh') or `export LANG=de_DE' (in `bash').
|
||||
This can be done from your `.login' or `.profile' file, once and for
|
||||
all.
|
||||
|
||||
You might think that the country code specification is redundant.
|
||||
But in fact, some languages have dialects in different countries. For
|
||||
example, `de_AT' is used for Austria, and `pt_BR' for Brazil. The
|
||||
country code serves to distinguish the dialects.
|
||||
|
||||
The locale naming convention of `LL_CC', with `LL' denoting the
|
||||
language and `CC' denoting the country, is the one use on systems based
|
||||
on GNU libc. On other systems, some variations of this scheme are
|
||||
used, such as `LL' or `LL_CC.ENCODING'. You can get the list of
|
||||
locales supported by your system for your country by running the command
|
||||
`locale -a | grep '^LL''.
|
||||
|
||||
Not all programs have translations for all languages. By default, an
|
||||
English message is shown in place of a nonexistent translation. If you
|
||||
understand other languages, you can set up a priority list of languages.
|
||||
This is done through a different environment variable, called
|
||||
`LANGUAGE'. GNU `gettext' gives preference to `LANGUAGE' over `LANG'
|
||||
for the purpose of message handling, but you still need to have `LANG'
|
||||
set to the primary language; this is required by other parts of the
|
||||
system libraries. For example, some Swedish users who would rather
|
||||
read translations in German than English for when Swedish is not
|
||||
available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv_SE'.
|
||||
|
||||
Special advice for Norwegian users: The language code for Norwegian
|
||||
bokma*l changed from `no' to `nb' recently (in 2003). During the
|
||||
transition period, while some message catalogs for this language are
|
||||
installed under `nb' and some older ones under `no', it's recommended
|
||||
for Norwegian users to set `LANGUAGE' to `nb:no' so that both newer and
|
||||
older translations are used.
|
||||
|
||||
In the `LANGUAGE' environment variable, but not in the `LANG'
|
||||
environment variable, `LL_CC' combinations can be abbreviated as `LL'
|
||||
to denote the language's main dialect. For example, `de' is equivalent
|
||||
to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT'
|
||||
(Portuguese as spoken in Portugal) in this context.
|
||||
|
||||
Translating Teams
|
||||
=================
|
||||
|
||||
For the Free Translation Project to be a success, we need interested
|
||||
people who like their own language and write it well, and who are also
|
||||
able to synergize with other translators speaking the same language.
|
||||
Each translation team has its own mailing list. The up-to-date list of
|
||||
teams can be found at the Free Translation Project's homepage,
|
||||
`http://www.iro.umontreal.ca/contrib/po/HTML/', in the "National teams"
|
||||
area.
|
||||
|
||||
If you'd like to volunteer to _work_ at translating messages, you
|
||||
should become a member of the translating team for your own language.
|
||||
The subscribing address is _not_ the same as the list itself, it has
|
||||
`-request' appended. For example, speakers of Swedish can send a
|
||||
message to `sv-request@li.org', having this message body:
|
||||
|
||||
subscribe
|
||||
|
||||
Keep in mind that team members are expected to participate
|
||||
_actively_ in translations, or at solving translational difficulties,
|
||||
rather than merely lurking around. If your team does not exist yet and
|
||||
you want to start one, or if you are unsure about what to do or how to
|
||||
get started, please write to `translation@iro.umontreal.ca' to reach the
|
||||
coordinator for all translator teams.
|
||||
|
||||
The English team is special. It works at improving and uniformizing
|
||||
the terminology in use. Proven linguistic skill are praised more than
|
||||
programming skill, here.
|
||||
|
||||
Available Packages
|
||||
==================
|
||||
|
||||
Languages are not equally supported in all packages. The following
|
||||
matrix shows the current state of internationalization, as of January
|
||||
2004. The matrix shows, in regard of each package, for which languages
|
||||
PO files have been submitted to translation coordination, with a
|
||||
translation percentage of at least 50%.
|
||||
|
||||
Ready PO files af am ar az be bg bs ca cs da de el en en_GB eo es
|
||||
+----------------------------------------------------+
|
||||
a2ps | [] [] [] [] |
|
||||
aegis | () |
|
||||
ant-phone | () |
|
||||
anubis | |
|
||||
ap-utils | |
|
||||
aspell | [] |
|
||||
bash | [] [] [] [] |
|
||||
batchelor | |
|
||||
bfd | [] [] |
|
||||
binutils | [] [] |
|
||||
bison | [] [] [] |
|
||||
bluez-pin | [] [] [] |
|
||||
clisp | |
|
||||
clisp | [] [] [] |
|
||||
console-tools | [] [] |
|
||||
coreutils | [] [] [] [] |
|
||||
cpio | [] [] [] |
|
||||
darkstat | [] () [] |
|
||||
diffutils | [] [] [] [] [] [] [] |
|
||||
e2fsprogs | [] [] [] |
|
||||
enscript | [] [] [] [] |
|
||||
error | [] [] [] [] [] |
|
||||
fetchmail | [] () [] [] [] [] |
|
||||
fileutils | [] [] [] |
|
||||
findutils | [] [] [] [] [] [] [] |
|
||||
flex | [] [] [] [] |
|
||||
fslint | |
|
||||
gas | [] |
|
||||
gawk | [] [] [] [] |
|
||||
gbiff | [] |
|
||||
gcal | [] |
|
||||
gcc | [] [] |
|
||||
gettext | [] [] [] [] [] |
|
||||
gettext-examples | [] [] [] [] |
|
||||
gettext-runtime | [] [] [] [] [] |
|
||||
gettext-tools | [] [] [] |
|
||||
gimp-print | [] [] [] [] [] |
|
||||
gliv | |
|
||||
glunarclock | [] [] |
|
||||
gnubiff | [] |
|
||||
gnucash | [] () [] [] |
|
||||
gnucash-glossary | [] () [] |
|
||||
gnupg | [] () [] [] [] [] |
|
||||
gpe-aerial | [] |
|
||||
gpe-beam | [] [] |
|
||||
gpe-calendar | [] [] |
|
||||
gpe-clock | [] [] |
|
||||
gpe-conf | [] [] |
|
||||
gpe-contacts | [] [] |
|
||||
gpe-edit | [] |
|
||||
gpe-go | [] |
|
||||
gpe-login | [] [] |
|
||||
gpe-ownerinfo | [] [] |
|
||||
gpe-sketchbook | [] [] |
|
||||
gpe-su | [] [] |
|
||||
gpe-taskmanager | [] [] |
|
||||
gpe-timesheet | [] |
|
||||
gpe-today | [] [] |
|
||||
gpe-todo | [] [] |
|
||||
gphoto2 | [] [] [] [] |
|
||||
gprof | [] [] [] |
|
||||
gpsdrive | () () () |
|
||||
gramadoir | [] |
|
||||
grep | [] [] [] [] [] [] |
|
||||
gretl | [] |
|
||||
gtick | [] () |
|
||||
hello | [] [] [] [] [] [] |
|
||||
id-utils | [] [] |
|
||||
indent | [] [] [] [] |
|
||||
iso_3166 | [] [] [] [] [] [] [] [] [] [] |
|
||||
iso_3166_1 | [] [] [] [] [] [] |
|
||||
iso_3166_2 | |
|
||||
iso_3166_3 | [] |
|
||||
iso_4217 | [] [] [] [] |
|
||||
iso_639 | |
|
||||
jpilot | [] [] [] |
|
||||
jtag | |
|
||||
jwhois | [] |
|
||||
kbd | [] [] [] [] [] |
|
||||
latrine | () |
|
||||
ld | [] [] |
|
||||
libc | [] [] [] [] [] [] |
|
||||
libgpewidget | [] [] |
|
||||
libiconv | [] [] [] [] [] |
|
||||
lifelines | [] () |
|
||||
lilypond | [] |
|
||||
lingoteach | |
|
||||
lingoteach_lessons | () () |
|
||||
lynx | [] [] [] [] |
|
||||
m4 | [] [] [] [] |
|
||||
mailutils | [] [] |
|
||||
make | [] [] [] |
|
||||
man-db | [] () [] [] () |
|
||||
minicom | [] [] [] |
|
||||
mysecretdiary | [] [] [] |
|
||||
nano | [] () [] [] [] |
|
||||
nano_1_0 | [] () [] [] [] |
|
||||
opcodes | [] |
|
||||
parted | [] [] [] [] [] |
|
||||
ptx | [] [] [] [] [] |
|
||||
python | |
|
||||
radius | [] |
|
||||
recode | [] [] [] [] [] [] [] |
|
||||
rpm | [] [] |
|
||||
screem | |
|
||||
scrollkeeper | [] [] [] [] [] [] |
|
||||
sed | [] [] [] [] [] [] |
|
||||
sh-utils | [] [] [] |
|
||||
shared-mime-info | |
|
||||
sharutils | [] [] [] [] [] [] |
|
||||
silky | () |
|
||||
skencil | [] () [] |
|
||||
sketch | [] () [] |
|
||||
soundtracker | [] [] [] |
|
||||
sp | [] |
|
||||
tar | [] [] [] [] |
|
||||
texinfo | [] [] [] |
|
||||
textutils | [] [] [] [] |
|
||||
tin | () () |
|
||||
tp-robot | |
|
||||
tuxpaint | [] [] [] [] [] [] [] |
|
||||
unicode-han-tra... | |
|
||||
unicode-transla... | |
|
||||
util-linux | [] [] [] [] [] |
|
||||
vorbis-tools | [] [] [] [] |
|
||||
wastesedge | () |
|
||||
wdiff | [] [] [] [] |
|
||||
wget | [] [] [] [] [] [] |
|
||||
xchat | [] [] [] [] |
|
||||
xfree86_xkb_xml | [] [] |
|
||||
xpad | [] |
|
||||
+----------------------------------------------------+
|
||||
af am ar az be bg bs ca cs da de el en en_GB eo es
|
||||
4 0 0 1 9 4 1 40 41 60 78 17 1 5 13 68
|
||||
|
||||
et eu fa fi fr ga gl he hr hu id is it ja ko lg
|
||||
+-------------------------------------------------+
|
||||
a2ps | [] [] [] () () |
|
||||
aegis | |
|
||||
ant-phone | [] |
|
||||
anubis | [] |
|
||||
ap-utils | [] |
|
||||
aspell | [] [] |
|
||||
bash | [] [] |
|
||||
batchelor | [] [] |
|
||||
bfd | [] |
|
||||
binutils | [] [] |
|
||||
bison | [] [] [] [] |
|
||||
bluez-pin | [] [] [] [] [] |
|
||||
clisp | |
|
||||
clisp | [] |
|
||||
console-tools | |
|
||||
coreutils | [] [] [] [] [] [] |
|
||||
cpio | [] [] [] [] |
|
||||
darkstat | () [] [] [] |
|
||||
diffutils | [] [] [] [] [] [] [] |
|
||||
e2fsprogs | |
|
||||
enscript | [] [] |
|
||||
error | [] [] [] [] |
|
||||
fetchmail | [] |
|
||||
fileutils | [] [] [] [] [] [] |
|
||||
findutils | [] [] [] [] [] [] [] [] [] [] [] |
|
||||
flex | [] [] [] |
|
||||
fslint | [] |
|
||||
gas | [] |
|
||||
gawk | [] [] [] |
|
||||
gbiff | [] |
|
||||
gcal | [] |
|
||||
gcc | [] |
|
||||
gettext | [] [] [] |
|
||||
gettext-examples | [] [] |
|
||||
gettext-runtime | [] [] [] [] [] |
|
||||
gettext-tools | [] [] [] |
|
||||
gimp-print | [] [] |
|
||||
gliv | () |
|
||||
glunarclock | [] [] [] [] |
|
||||
gnubiff | [] |
|
||||
gnucash | () [] |
|
||||
gnucash-glossary | [] |
|
||||
gnupg | [] [] [] [] [] [] [] |
|
||||
gpe-aerial | [] |
|
||||
gpe-beam | [] |
|
||||
gpe-calendar | [] [] [] |
|
||||
gpe-clock | [] |
|
||||
gpe-conf | [] |
|
||||
gpe-contacts | [] [] |
|
||||
gpe-edit | [] [] |
|
||||
gpe-go | [] |
|
||||
gpe-login | [] [] |
|
||||
gpe-ownerinfo | [] [] [] |
|
||||
gpe-sketchbook | [] |
|
||||
gpe-su | [] |
|
||||
gpe-taskmanager | [] |
|
||||
gpe-timesheet | [] [] [] |
|
||||
gpe-today | [] [] |
|
||||
gpe-todo | [] [] |
|
||||
gphoto2 | [] [] [] |
|
||||
gprof | [] [] |
|
||||
gpsdrive | () () () |
|
||||
gramadoir | [] [] |
|
||||
grep | [] [] [] [] [] [] [] [] [] [] [] |
|
||||
gretl | [] [] |
|
||||
gtick | [] [] [] |
|
||||
hello | [] [] [] [] [] [] [] [] [] [] [] [] [] |
|
||||
id-utils | [] [] [] [] |
|
||||
indent | [] [] [] [] [] [] [] [] [] |
|
||||
iso_3166 | [] [] [] [] [] [] [] |
|
||||
iso_3166_1 | [] [] [] [] [] |
|
||||
iso_3166_2 | |
|
||||
iso_3166_3 | |
|
||||
iso_4217 | [] [] [] [] [] [] |
|
||||
iso_639 | |
|
||||
jpilot | [] () |
|
||||
jtag | [] |
|
||||
jwhois | [] [] [] [] |
|
||||
kbd | [] |
|
||||
latrine | [] |
|
||||
ld | [] |
|
||||
libc | [] [] [] [] [] [] |
|
||||
libgpewidget | [] [] [] [] |
|
||||
libiconv | [] [] [] [] [] [] [] [] [] |
|
||||
lifelines | () |
|
||||
lilypond | [] |
|
||||
lingoteach | [] [] |
|
||||
lingoteach_lessons | |
|
||||
lynx | [] [] [] [] |
|
||||
m4 | [] [] [] [] |
|
||||
mailutils | |
|
||||
make | [] [] [] [] [] [] |
|
||||
man-db | () () |
|
||||
minicom | [] [] [] [] |
|
||||
mysecretdiary | [] [] |
|
||||
nano | [] [] [] [] |
|
||||
nano_1_0 | [] [] [] [] |
|
||||
opcodes | [] |
|
||||
parted | [] [] [] |
|
||||
ptx | [] [] [] [] [] [] [] |
|
||||
python | |
|
||||
radius | [] |
|
||||
recode | [] [] [] [] [] [] |
|
||||
rpm | [] [] |
|
||||
screem | |
|
||||
scrollkeeper | [] |
|
||||
sed | [] [] [] [] [] [] [] [] [] |
|
||||
sh-utils | [] [] [] [] [] [] [] |
|
||||
shared-mime-info | [] [] [] |
|
||||
sharutils | [] [] [] [] [] |
|
||||
silky | () [] () () |
|
||||
skencil | [] |
|
||||
sketch | [] |
|
||||
soundtracker | [] [] |
|
||||
sp | [] () |
|
||||
tar | [] [] [] [] [] [] [] [] [] |
|
||||
texinfo | [] [] [] [] |
|
||||
textutils | [] [] [] [] [] [] |
|
||||
tin | [] () |
|
||||
tp-robot | [] |
|
||||
tuxpaint | [] [] [] [] [] [] [] [] [] |
|
||||
unicode-han-tra... | |
|
||||
unicode-transla... | [] [] |
|
||||
util-linux | [] [] [] [] () [] |
|
||||
vorbis-tools | [] |
|
||||
wastesedge | () |
|
||||
wdiff | [] [] [] [] [] [] |
|
||||
wget | [] [] [] [] [] [] [] |
|
||||
xchat | [] [] [] |
|
||||
xfree86_xkb_xml | [] [] |
|
||||
xpad | [] [] |
|
||||
+-------------------------------------------------+
|
||||
et eu fa fi fr ga gl he hr hu id is it ja ko lg
|
||||
22 2 1 26 106 28 24 8 10 41 33 1 26 33 12 0
|
||||
|
||||
lt lv mk mn ms mt nb nl nn no nso pl pt pt_BR ro ru
|
||||
+-----------------------------------------------------+
|
||||
a2ps | [] [] () () [] [] [] |
|
||||
aegis | () () () |
|
||||
ant-phone | [] [] |
|
||||
anubis | [] [] [] [] [] [] |
|
||||
ap-utils | [] () [] |
|
||||
aspell | [] |
|
||||
bash | [] [] [] |
|
||||
batchelor | [] |
|
||||
bfd | [] |
|
||||
binutils | [] |
|
||||
bison | [] [] [] [] [] |
|
||||
bluez-pin | [] [] [] |
|
||||
clisp | |
|
||||
clisp | [] |
|
||||
console-tools | [] |
|
||||
coreutils | [] [] |
|
||||
cpio | [] [] [] [] [] |
|
||||
darkstat | [] [] [] [] |
|
||||
diffutils | [] [] [] [] [] [] |
|
||||
e2fsprogs | [] |
|
||||
enscript | [] [] [] [] |
|
||||
error | [] [] [] |
|
||||
fetchmail | [] [] () [] |
|
||||
fileutils | [] [] [] |
|
||||
findutils | [] [] [] [] [] |
|
||||
flex | [] [] [] [] |
|
||||
fslint | [] [] |
|
||||
gas | |
|
||||
gawk | [] [] [] |
|
||||
gbiff | [] [] |
|
||||
gcal | |
|
||||
gcc | |
|
||||
gettext | [] [] [] |
|
||||
gettext-examples | [] [] [] |
|
||||
gettext-runtime | [] [] [] [] |
|
||||
gettext-tools | [] [] |
|
||||
gimp-print | [] |
|
||||
gliv | [] [] [] |
|
||||
glunarclock | [] [] [] [] |
|
||||
gnubiff | [] |
|
||||
gnucash | [] [] () [] |
|
||||
gnucash-glossary | [] [] |
|
||||
gnupg | [] |
|
||||
gpe-aerial | [] [] [] [] |
|
||||
gpe-beam | [] [] [] [] |
|
||||
gpe-calendar | [] [] [] [] |
|
||||
gpe-clock | [] [] [] [] |
|
||||
gpe-conf | [] [] [] [] |
|
||||
gpe-contacts | [] [] [] [] |
|
||||
gpe-edit | [] [] [] [] |
|
||||
gpe-go | [] [] [] |
|
||||
gpe-login | [] [] [] [] |
|
||||
gpe-ownerinfo | [] [] [] [] |
|
||||
gpe-sketchbook | [] [] [] [] |
|
||||
gpe-su | [] [] [] [] |
|
||||
gpe-taskmanager | [] [] [] [] |
|
||||
gpe-timesheet | [] [] [] [] |
|
||||
gpe-today | [] [] [] [] |
|
||||
gpe-todo | [] [] [] [] |
|
||||
gphoto2 | [] |
|
||||
gprof | [] [] |
|
||||
gpsdrive | () () [] |
|
||||
gramadoir | () [] |
|
||||
grep | [] [] [] [] [] |
|
||||
gretl | |
|
||||
gtick | [] [] [] |
|
||||
hello | [] [] [] [] [] [] [] [] [] [] |
|
||||
id-utils | [] [] [] [] |
|
||||
indent | [] [] [] [] |
|
||||
iso_3166 | [] [] [] |
|
||||
iso_3166_1 | [] [] |
|
||||
iso_3166_2 | |
|
||||
iso_3166_3 | [] |
|
||||
iso_4217 | [] [] [] [] [] [] [] [] |
|
||||
iso_639 | [] |
|
||||
jpilot | () () |
|
||||
jtag | |
|
||||
jwhois | [] [] [] [] () |
|
||||
kbd | [] [] [] |
|
||||
latrine | [] |
|
||||
ld | |
|
||||
libc | [] [] [] [] |
|
||||
libgpewidget | [] [] [] |
|
||||
libiconv | [] [] [] [] [] |
|
||||
lifelines | |
|
||||
lilypond | |
|
||||
lingoteach | |
|
||||
lingoteach_lessons | |
|
||||
lynx | [] [] [] |
|
||||
m4 | [] [] [] [] [] |
|
||||
mailutils | [] [] [] |
|
||||
make | [] [] [] [] |
|
||||
man-db | [] |
|
||||
minicom | [] [] [] [] |
|
||||
mysecretdiary | [] [] [] |
|
||||
nano | [] [] [] [] [] |
|
||||
nano_1_0 | [] [] [] [] [] [] |
|
||||
opcodes | [] [] |
|
||||
parted | [] [] [] [] |
|
||||
ptx | [] [] [] [] [] [] [] [] |
|
||||
python | |
|
||||
radius | [] [] |
|
||||
recode | [] [] [] [] |
|
||||
rpm | [] [] [] |
|
||||
screem | |
|
||||
scrollkeeper | [] [] [] [] [] |
|
||||
sed | [] [] [] |
|
||||
sh-utils | [] [] |
|
||||
shared-mime-info | [] [] |
|
||||
sharutils | [] [] |
|
||||
silky | () |
|
||||
skencil | [] [] |
|
||||
sketch | [] [] |
|
||||
soundtracker | |
|
||||
sp | |
|
||||
tar | [] [] [] [] [] [] |
|
||||
texinfo | [] [] [] [] |
|
||||
textutils | [] [] |
|
||||
tin | |
|
||||
tp-robot | [] |
|
||||
tuxpaint | [] [] [] [] [] [] [] [] |
|
||||
unicode-han-tra... | |
|
||||
unicode-transla... | |
|
||||
util-linux | [] [] [] |
|
||||
vorbis-tools | [] [] [] |
|
||||
wastesedge | |
|
||||
wdiff | [] [] [] [] [] |
|
||||
wget | [] [] [] |
|
||||
xchat | [] [] [] |
|
||||
xfree86_xkb_xml | [] [] |
|
||||
xpad | [] [] |
|
||||
+-----------------------------------------------------+
|
||||
lt lv mk mn ms mt nb nl nn no nso pl pt pt_BR ro ru
|
||||
1 2 0 3 12 0 10 69 6 7 1 40 26 36 76 63
|
||||
|
||||
sk sl sr sv ta th tr uk ven vi wa xh zh_CN zh_TW zu
|
||||
+-----------------------------------------------------+
|
||||
a2ps | [] [] [] [] | 16
|
||||
aegis | | 0
|
||||
ant-phone | | 3
|
||||
anubis | [] [] | 9
|
||||
ap-utils | () | 3
|
||||
aspell | | 4
|
||||
bash | | 9
|
||||
batchelor | | 3
|
||||
bfd | [] [] | 6
|
||||
binutils | [] [] [] | 8
|
||||
bison | [] [] | 14
|
||||
bluez-pin | [] [] [] | 14
|
||||
clisp | | 0
|
||||
clisp | | 5
|
||||
console-tools | | 3
|
||||
coreutils | [] [] [] [] | 16
|
||||
cpio | [] [] | 14
|
||||
darkstat | [] [] [] () () | 12
|
||||
diffutils | [] [] [] | 23
|
||||
e2fsprogs | [] [] | 6
|
||||
enscript | [] [] | 12
|
||||
error | [] [] [] | 15
|
||||
fetchmail | [] [] | 11
|
||||
fileutils | [] [] [] [] [] | 17
|
||||
findutils | [] [] [] [] [] [] | 29
|
||||
flex | [] [] | 13
|
||||
fslint | | 3
|
||||
gas | [] | 3
|
||||
gawk | [] [] | 12
|
||||
gbiff | | 4
|
||||
gcal | [] [] | 4
|
||||
gcc | [] | 4
|
||||
gettext | [] [] [] [] [] | 16
|
||||
gettext-examples | [] [] [] [] [] | 14
|
||||
gettext-runtime | [] [] [] [] [] [] [] [] | 22
|
||||
gettext-tools | [] [] [] [] [] [] | 14
|
||||
gimp-print | [] [] | 10
|
||||
gliv | | 3
|
||||
glunarclock | [] [] [] | 13
|
||||
gnubiff | | 3
|
||||
gnucash | [] [] | 9
|
||||
gnucash-glossary | [] [] [] | 8
|
||||
gnupg | [] [] [] [] | 17
|
||||
gpe-aerial | [] | 7
|
||||
gpe-beam | [] | 8
|
||||
gpe-calendar | [] [] [] [] | 13
|
||||
gpe-clock | [] [] [] | 10
|
||||
gpe-conf | [] [] | 9
|
||||
gpe-contacts | [] [] [] | 11
|
||||
gpe-edit | [] [] [] [] [] | 12
|
||||
gpe-go | | 5
|
||||
gpe-login | [] [] [] [] [] | 13
|
||||
gpe-ownerinfo | [] [] [] [] | 13
|
||||
gpe-sketchbook | [] [] | 9
|
||||
gpe-su | [] [] [] | 10
|
||||
gpe-taskmanager | [] [] [] | 10
|
||||
gpe-timesheet | [] [] [] [] | 12
|
||||
gpe-today | [] [] [] [] [] | 13
|
||||
gpe-todo | [] [] [] [] | 12
|
||||
gphoto2 | [] [] [] | 11
|
||||
gprof | [] [] | 9
|
||||
gpsdrive | [] [] | 3
|
||||
gramadoir | [] | 5
|
||||
grep | [] [] [] [] | 26
|
||||
gretl | | 3
|
||||
gtick | | 7
|
||||
hello | [] [] [] [] [] | 34
|
||||
id-utils | [] [] | 12
|
||||
indent | [] [] [] [] | 21
|
||||
iso_3166 | [] [] [] [] [] [] [] | 27
|
||||
iso_3166_1 | [] [] [] | 16
|
||||
iso_3166_2 | | 0
|
||||
iso_3166_3 | | 2
|
||||
iso_4217 | [] [] [] [] [] [] | 24
|
||||
iso_639 | | 1
|
||||
jpilot | [] [] [] [] [] | 9
|
||||
jtag | [] | 2
|
||||
jwhois | () [] [] | 11
|
||||
kbd | [] [] | 11
|
||||
latrine | | 2
|
||||
ld | [] [] | 5
|
||||
libc | [] [] [] [] | 20
|
||||
libgpewidget | [] [] [] [] | 13
|
||||
libiconv | [] [] [] [] [] [] [] [] | 27
|
||||
lifelines | [] | 2
|
||||
lilypond | [] | 3
|
||||
lingoteach | | 2
|
||||
lingoteach_lessons | () | 0
|
||||
lynx | [] [] [] | 14
|
||||
m4 | [] [] | 15
|
||||
mailutils | | 5
|
||||
make | [] [] [] | 16
|
||||
man-db | [] | 5
|
||||
minicom | | 11
|
||||
mysecretdiary | [] [] | 10
|
||||
nano | [] [] [] [] | 17
|
||||
nano_1_0 | [] [] [] | 17
|
||||
opcodes | [] [] | 6
|
||||
parted | [] [] [] | 15
|
||||
ptx | [] [] | 22
|
||||
python | | 0
|
||||
radius | | 4
|
||||
recode | [] [] [] | 20
|
||||
rpm | [] [] | 9
|
||||
screem | [] [] | 2
|
||||
scrollkeeper | [] [] [] | 15
|
||||
sed | [] [] [] [] [] [] | 24
|
||||
sh-utils | [] [] | 14
|
||||
shared-mime-info | [] [] | 7
|
||||
sharutils | [] [] [] [] | 17
|
||||
silky | () | 3
|
||||
skencil | [] | 6
|
||||
sketch | [] | 6
|
||||
soundtracker | [] [] | 7
|
||||
sp | [] | 3
|
||||
tar | [] [] [] [] [] | 24
|
||||
texinfo | [] [] [] | 14
|
||||
textutils | [] [] [] [] | 16
|
||||
tin | | 1
|
||||
tp-robot | | 2
|
||||
tuxpaint | [] [] [] [] [] | 29
|
||||
unicode-han-tra... | | 0
|
||||
unicode-transla... | | 2
|
||||
util-linux | [] [] | 15
|
||||
vorbis-tools | | 8
|
||||
wastesedge | | 0
|
||||
wdiff | [] [] [] | 18
|
||||
wget | [] [] [] [] [] [] [] [] | 24
|
||||
xchat | [] [] [] [] [] | 15
|
||||
xfree86_xkb_xml | [] [] [] [] [] | 11
|
||||
xpad | | 5
|
||||
+-----------------------------------------------------+
|
||||
63 teams sk sl sr sv ta th tr uk ven vi wa xh zh_CN zh_TW zu
|
||||
131 domains 47 19 28 83 0 0 59 13 1 1 11 0 22 22 0 1373
|
||||
|
||||
Some counters in the preceding matrix are higher than the number of
|
||||
visible blocks let us expect. This is because a few extra PO files are
|
||||
used for implementing regional variants of languages, or language
|
||||
dialects.
|
||||
|
||||
For a PO file in the matrix above to be effective, the package to
|
||||
which it applies should also have been internationalized and
|
||||
distributed as such by its maintainer. There might be an observable
|
||||
lag between the mere existence a PO file and its wide availability in a
|
||||
distribution.
|
||||
|
||||
If January 2004 seems to be old, you may fetch a more recent copy of
|
||||
this `ABOUT-NLS' file on most GNU archive sites. The most up-to-date
|
||||
matrix with full percentage details can be found at
|
||||
`http://www.iro.umontreal.ca/contrib/po/HTML/matrix.html'.
|
||||
|
||||
Using `gettext' in new packages
|
||||
===============================
|
||||
|
||||
If you are writing a freely available program and want to
|
||||
internationalize it you are welcome to use GNU `gettext' in your
|
||||
package. Of course you have to respect the GNU Library General Public
|
||||
License which covers the use of the GNU `gettext' library. This means
|
||||
in particular that even non-free programs can use `libintl' as a shared
|
||||
library, whereas only free software can use `libintl' as a static
|
||||
library or use modified versions of `libintl'.
|
||||
|
||||
Once the sources are changed appropriately and the setup can handle
|
||||
the use of `gettext' the only thing missing are the translations. The
|
||||
Free Translation Project is also available for packages which are not
|
||||
developed inside the GNU project. Therefore the information given above
|
||||
applies also for every other Free Software Project. Contact
|
||||
`translation@iro.umontreal.ca' to make the `.pot' files available to
|
||||
the translation teams.
|
||||
|
2
AUTHORS
2
AUTHORS
|
@ -1,3 +1,3 @@
|
|||
Artem Pavlenko <artem@pavlenko.uklinux.net>
|
||||
Artem Pavlenko <apavlenko@users.berlios.de>
|
||||
|
||||
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
2004-11-29 gettextize <bug-gnu-gettext@gnu.org>
|
||||
|
||||
* Makefile.am (SUBDIRS): New variable.
|
||||
(ACLOCAL_AMFLAGS): New variable.
|
||||
(EXTRA_DIST): New variable.
|
||||
* configure.ac (AC_CONFIG_FILES): Add po/Makefile.in,
|
||||
|
229
INSTALL
229
INSTALL
|
@ -1,231 +1,4 @@
|
|||
Installation Instructions
|
||||
*************************
|
||||
|
||||
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004 Free
|
||||
Software Foundation, Inc.
|
||||
|
||||
This file is free documentation; the Free Software Foundation gives
|
||||
unlimited permission to copy, distribute and modify it.
|
||||
|
||||
Basic Installation
|
||||
==================
|
||||
|
||||
These are generic installation instructions.
|
||||
|
||||
The `configure' shell script attempts to guess correct values for
|
||||
various system-dependent variables used during compilation. It uses
|
||||
those values to create a `Makefile' in each directory of the package.
|
||||
It may also create one or more `.h' files containing system-dependent
|
||||
definitions. Finally, it creates a shell script `config.status' that
|
||||
you can run in the future to recreate the current configuration, and a
|
||||
file `config.log' containing compiler output (useful mainly for
|
||||
debugging `configure').
|
||||
|
||||
It can also use an optional file (typically called `config.cache'
|
||||
and enabled with `--cache-file=config.cache' or simply `-C') that saves
|
||||
the results of its tests to speed up reconfiguring. (Caching is
|
||||
disabled by default to prevent problems with accidental use of stale
|
||||
cache files.)
|
||||
|
||||
If you need to do unusual things to compile the package, please try
|
||||
to figure out how `configure' could check whether to do them, and mail
|
||||
diffs or instructions to the address given in the `README' so they can
|
||||
be considered for the next release. If you are using the cache, and at
|
||||
some point `config.cache' contains results you don't want to keep, you
|
||||
may remove or edit it.
|
||||
|
||||
The file `configure.ac' (or `configure.in') is used to create
|
||||
`configure' by a program called `autoconf'. You only need
|
||||
`configure.ac' if you want to change it or regenerate `configure' using
|
||||
a newer version of `autoconf'.
|
||||
|
||||
The simplest way to compile this package is:
|
||||
|
||||
1. `cd' to the directory containing the package's source code and type
|
||||
`./configure' to configure the package for your system. If you're
|
||||
using `csh' on an old version of System V, you might need to type
|
||||
`sh ./configure' instead to prevent `csh' from trying to execute
|
||||
`configure' itself.
|
||||
|
||||
Running `configure' takes awhile. While running, it prints some
|
||||
messages telling which features it is checking for.
|
||||
|
||||
2. Type `make' to compile the package.
|
||||
|
||||
3. Optionally, type `make check' to run any self-tests that come with
|
||||
the package.
|
||||
|
||||
4. Type `make install' to install the programs and any data files and
|
||||
documentation.
|
||||
|
||||
5. You can remove the program binaries and object files from the
|
||||
source code directory by typing `make clean'. To also remove the
|
||||
files that `configure' created (so you can compile the package for
|
||||
a different kind of computer), type `make distclean'. There is
|
||||
also a `make maintainer-clean' target, but that is intended mainly
|
||||
for the package's developers. If you use it, you may have to get
|
||||
all sorts of other programs in order to regenerate files that came
|
||||
with the distribution.
|
||||
|
||||
Compilers and Options
|
||||
=====================
|
||||
|
||||
Some systems require unusual options for compilation or linking that the
|
||||
`configure' script does not know about. Run `./configure --help' for
|
||||
details on some of the pertinent environment variables.
|
||||
|
||||
You can give `configure' initial values for configuration parameters
|
||||
by setting variables in the command line or in the environment. Here
|
||||
is an example:
|
||||
|
||||
./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
|
||||
|
||||
*Note Defining Variables::, for more details.
|
||||
|
||||
Compiling For Multiple Architectures
|
||||
====================================
|
||||
|
||||
You can compile the package for more than one kind of computer at the
|
||||
same time, by placing the object files for each architecture in their
|
||||
own directory. To do this, you must use a version of `make' that
|
||||
supports the `VPATH' variable, such as GNU `make'. `cd' to the
|
||||
directory where you want the object files and executables to go and run
|
||||
the `configure' script. `configure' automatically checks for the
|
||||
source code in the directory that `configure' is in and in `..'.
|
||||
|
||||
If you have to use a `make' that does not support the `VPATH'
|
||||
variable, you have to compile the package for one architecture at a
|
||||
time in the source code directory. After you have installed the
|
||||
package for one architecture, use `make distclean' before reconfiguring
|
||||
for another architecture.
|
||||
|
||||
Installation Names
|
||||
==================
|
||||
|
||||
By default, `make install' will install the package's files in
|
||||
`/usr/local/bin', `/usr/local/man', etc. You can specify an
|
||||
installation prefix other than `/usr/local' by giving `configure' the
|
||||
option `--prefix=PREFIX'.
|
||||
|
||||
You can specify separate installation prefixes for
|
||||
architecture-specific files and architecture-independent files. If you
|
||||
give `configure' the option `--exec-prefix=PREFIX', the package will
|
||||
use PREFIX as the prefix for installing programs and libraries.
|
||||
Documentation and other data files will still use the regular prefix.
|
||||
|
||||
In addition, if you use an unusual directory layout you can give
|
||||
options like `--bindir=DIR' to specify different values for particular
|
||||
kinds of files. Run `configure --help' for a list of the directories
|
||||
you can set and what kinds of files go in them.
|
||||
|
||||
If the package supports it, you can cause programs to be installed
|
||||
with an extra prefix or suffix on their names by giving `configure' the
|
||||
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
|
||||
|
||||
Optional Features
|
||||
=================
|
||||
|
||||
Some packages pay attention to `--enable-FEATURE' options to
|
||||
`configure', where FEATURE indicates an optional part of the package.
|
||||
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
|
||||
is something like `gnu-as' or `x' (for the X Window System). The
|
||||
`README' should mention any `--enable-' and `--with-' options that the
|
||||
package recognizes.
|
||||
|
||||
For packages that use the X Window System, `configure' can usually
|
||||
find the X include and library files automatically, but if it doesn't,
|
||||
you can use the `configure' options `--x-includes=DIR' and
|
||||
`--x-libraries=DIR' to specify their locations.
|
||||
|
||||
Specifying the System Type
|
||||
==========================
|
||||
|
||||
There may be some features `configure' cannot figure out automatically,
|
||||
but needs to determine by the type of machine the package will run on.
|
||||
Usually, assuming the package is built to be run on the _same_
|
||||
architectures, `configure' can figure that out, but if it prints a
|
||||
message saying it cannot guess the machine type, give it the
|
||||
`--build=TYPE' option. TYPE can either be a short name for the system
|
||||
type, such as `sun4', or a canonical name which has the form:
|
||||
|
||||
CPU-COMPANY-SYSTEM
|
||||
|
||||
where SYSTEM can have one of these forms:
|
||||
|
||||
OS KERNEL-OS
|
||||
|
||||
See the file `config.sub' for the possible values of each field. If
|
||||
`config.sub' isn't included in this package, then this package doesn't
|
||||
need to know the machine type.
|
||||
|
||||
If you are _building_ compiler tools for cross-compiling, you should
|
||||
use the `--target=TYPE' option to select the type of system they will
|
||||
produce code for.
|
||||
|
||||
If you want to _use_ a cross compiler, that generates code for a
|
||||
platform different from the build platform, you should specify the
|
||||
"host" platform (i.e., that on which the generated programs will
|
||||
eventually be run) with `--host=TYPE'.
|
||||
|
||||
Sharing Defaults
|
||||
================
|
||||
|
||||
If you want to set default values for `configure' scripts to share, you
|
||||
can create a site shell script called `config.site' that gives default
|
||||
values for variables like `CC', `cache_file', and `prefix'.
|
||||
`configure' looks for `PREFIX/share/config.site' if it exists, then
|
||||
`PREFIX/etc/config.site' if it exists. Or, you can set the
|
||||
`CONFIG_SITE' environment variable to the location of the site script.
|
||||
A warning: not all `configure' scripts look for a site script.
|
||||
|
||||
Defining Variables
|
||||
==================
|
||||
|
||||
Variables not defined in a site shell script can be set in the
|
||||
environment passed to `configure'. However, some packages may run
|
||||
configure again during the build, and the customized values of these
|
||||
variables may be lost. In order to avoid this problem, you should set
|
||||
them in the `configure' command line, using `VAR=value'. For example:
|
||||
|
||||
./configure CC=/usr/local2/bin/gcc
|
||||
|
||||
will cause the specified gcc to be used as the C compiler (unless it is
|
||||
overridden in the site shell script).
|
||||
|
||||
`configure' Invocation
|
||||
======================
|
||||
|
||||
`configure' recognizes the following options to control how it operates.
|
||||
|
||||
`--help'
|
||||
`-h'
|
||||
Print a summary of the options to `configure', and exit.
|
||||
|
||||
`--version'
|
||||
`-V'
|
||||
Print the version of Autoconf used to generate the `configure'
|
||||
script, and exit.
|
||||
|
||||
`--cache-file=FILE'
|
||||
Enable the cache: use and save the results of the tests in FILE,
|
||||
traditionally `config.cache'. FILE defaults to `/dev/null' to
|
||||
disable caching.
|
||||
|
||||
`--config-cache'
|
||||
`-C'
|
||||
Alias for `--cache-file=config.cache'.
|
||||
|
||||
`--quiet'
|
||||
`--silent'
|
||||
`-q'
|
||||
Do not print messages saying which checks are being made. To
|
||||
suppress all normal output, redirect it to `/dev/null' (any error
|
||||
messages will still be shown).
|
||||
|
||||
`--srcdir=DIR'
|
||||
Look for the package's source code in directory DIR. Usually
|
||||
`configure' can determine that directory automatically.
|
||||
|
||||
`configure' also accepts some other, not widely useful, options. Run
|
||||
`configure --help' for more details.
|
||||
|
||||
TODO!
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
SUBDIRS = m4 libltdl include src utils/shapeindex
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
EXTRA_DIST = config.rpath mkinstalldirs
|
597
Makefile.in
597
Makefile.in
|
@ -1,597 +0,0 @@
|
|||
# Makefile.in generated by automake 1.9.3 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
top_builddir = .
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
|
||||
$(srcdir)/Makefile.in $(top_srcdir)/configure ABOUT-NLS \
|
||||
AUTHORS COPYING ChangeLog INSTALL NEWS config.guess \
|
||||
config.rpath config.sub depcomp install-sh ltmain.sh missing \
|
||||
mkinstalldirs
|
||||
subdir = .
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
|
||||
$(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
|
||||
configure.lineno configure.status.lineno
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/include/config.hh
|
||||
CONFIG_CLEAN_FILES =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
|
||||
html-recursive info-recursive install-data-recursive \
|
||||
install-exec-recursive install-info-recursive \
|
||||
install-recursive installcheck-recursive installdirs-recursive \
|
||||
pdf-recursive ps-recursive uninstall-info-recursive \
|
||||
uninstall-recursive
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DIST_SUBDIRS = $(SUBDIRS)
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
distdir = $(PACKAGE)-$(VERSION)
|
||||
top_distdir = $(distdir)
|
||||
am__remove_distdir = \
|
||||
{ test ! -d $(distdir) \
|
||||
|| { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
|
||||
&& rm -fr $(distdir); }; }
|
||||
DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2
|
||||
GZIP_ENV = --best
|
||||
distuninstallcheck_listfiles = find . -type f -print
|
||||
distcleancheck_listfiles = find . -type f -print
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
BUILD_TIFF_READER_FALSE = @BUILD_TIFF_READER_FALSE@
|
||||
BUILD_TIFF_READER_TRUE = @BUILD_TIFF_READER_TRUE@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
ECHO = @ECHO@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
F77 = @F77@
|
||||
FFLAGS = @FFLAGS@
|
||||
INCLTDL = @INCLTDL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBLTDL = @LIBLTDL@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
POSTGIS_DATASOURCE_FALSE = @POSTGIS_DATASOURCE_FALSE@
|
||||
POSTGIS_DATASOURCE_TRUE = @POSTGIS_DATASOURCE_TRUE@
|
||||
POSTGRESQL_CFLAGS = @POSTGRESQL_CFLAGS@
|
||||
POSTGRESQL_LIBS = @POSTGRESQL_LIBS@
|
||||
POSTGRESQL_PREFIX = @POSTGRESQL_PREFIX@
|
||||
RANLIB = @RANLIB@
|
||||
RASTER_DATASOURCE_FALSE = @RASTER_DATASOURCE_FALSE@
|
||||
RASTER_DATASOURCE_TRUE = @RASTER_DATASOURCE_TRUE@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHAPE_DATASOURCE_FALSE = @SHAPE_DATASOURCE_FALSE@
|
||||
SHAPE_DATASOURCE_TRUE = @SHAPE_DATASOURCE_TRUE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
TIFF_LDFLAGS = @TIFF_LDFLAGS@
|
||||
VERSION = @VERSION@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_F77 = @ac_ct_F77@
|
||||
ac_ct_RANLIB = @ac_ct_RANLIB@
|
||||
ac_ct_STRIP = @ac_ct_STRIP@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
|
||||
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
datadir = @datadir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pluginsdir = @pluginsdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
subdirs = @subdirs@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
SUBDIRS = m4 libltdl include src utils/shapeindex
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
EXTRA_DIST = config.rpath mkinstalldirs
|
||||
all: all-recursive
|
||||
|
||||
.SUFFIXES:
|
||||
am--refresh:
|
||||
@:
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \
|
||||
cd $(srcdir) && $(AUTOMAKE) --gnu \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
echo ' $(SHELL) ./config.status'; \
|
||||
$(SHELL) ./config.status;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
$(SHELL) ./config.status --recheck
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(srcdir) && $(AUTOCONF)
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
-rm -f libtool
|
||||
uninstall-info-am:
|
||||
|
||||
# This directory's subdirectories are mostly independent; you can cd
|
||||
# into them and run `make' without going through this Makefile.
|
||||
# To change the values of `make' variables: instead of editing Makefiles,
|
||||
# (1) if the variable is set in `config.status', edit `config.status'
|
||||
# (which will cause the Makefiles to be regenerated when you run `make');
|
||||
# (2) otherwise, pass the desired values on the `make' command line.
|
||||
$(RECURSIVE_TARGETS):
|
||||
@set fnord $$MAKEFLAGS; amf=$$2; \
|
||||
dot_seen=no; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
dot_seen=yes; \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
|
||||
done; \
|
||||
if test "$$dot_seen" = "no"; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
|
||||
fi; test -z "$$fail"
|
||||
|
||||
mostlyclean-recursive clean-recursive distclean-recursive \
|
||||
maintainer-clean-recursive:
|
||||
@set fnord $$MAKEFLAGS; amf=$$2; \
|
||||
dot_seen=no; \
|
||||
case "$@" in \
|
||||
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
|
||||
*) list='$(SUBDIRS)' ;; \
|
||||
esac; \
|
||||
rev=''; for subdir in $$list; do \
|
||||
if test "$$subdir" = "."; then :; else \
|
||||
rev="$$subdir $$rev"; \
|
||||
fi; \
|
||||
done; \
|
||||
rev="$$rev ."; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
for subdir in $$rev; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
|
||||
done && test -z "$$fail"
|
||||
tags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
|
||||
done
|
||||
ctags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
|
||||
done
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
|
||||
include_option=--etags-include; \
|
||||
empty_fix=.; \
|
||||
else \
|
||||
include_option=--include; \
|
||||
empty_fix=; \
|
||||
fi; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test ! -f $$subdir/TAGS || \
|
||||
tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
|
||||
fi; \
|
||||
done; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
$(am__remove_distdir)
|
||||
mkdir $(distdir)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||
esac; \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
dir="/$$dir"; \
|
||||
$(mkdir_p) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test -d "$(distdir)/$$subdir" \
|
||||
|| $(mkdir_p) "$(distdir)/$$subdir" \
|
||||
|| exit 1; \
|
||||
distdir=`$(am__cd) $(distdir) && pwd`; \
|
||||
top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
|
||||
(cd $$subdir && \
|
||||
$(MAKE) $(AM_MAKEFLAGS) \
|
||||
top_distdir="$$top_distdir" \
|
||||
distdir="$$distdir/$$subdir" \
|
||||
distdir) \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
|
||||
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
|
||||
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
|
||||
! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
|
||||
|| chmod -R a+r $(distdir)
|
||||
dist-gzip: distdir
|
||||
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||
$(am__remove_distdir)
|
||||
dist-bzip2: distdir
|
||||
tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-tarZ: distdir
|
||||
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-shar: distdir
|
||||
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-zip: distdir
|
||||
-rm -f $(distdir).zip
|
||||
zip -rq $(distdir).zip $(distdir)
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist dist-all: distdir
|
||||
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||
tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
|
||||
$(am__remove_distdir)
|
||||
|
||||
# This target untars the dist file and tries a VPATH configuration. Then
|
||||
# it guarantees that the distribution is self-contained by making another
|
||||
# tarfile.
|
||||
distcheck: dist
|
||||
case '$(DIST_ARCHIVES)' in \
|
||||
*.tar.gz*) \
|
||||
GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
|
||||
*.tar.bz2*) \
|
||||
bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
|
||||
*.tar.Z*) \
|
||||
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
|
||||
*.shar.gz*) \
|
||||
GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
|
||||
*.zip*) \
|
||||
unzip $(distdir).zip ;;\
|
||||
esac
|
||||
chmod -R a-w $(distdir); chmod a+w $(distdir)
|
||||
mkdir $(distdir)/_build
|
||||
mkdir $(distdir)/_inst
|
||||
chmod a-w $(distdir)
|
||||
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
|
||||
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
|
||||
&& cd $(distdir)/_build \
|
||||
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
|
||||
$(DISTCHECK_CONFIGURE_FLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) check \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
|
||||
distuninstallcheck \
|
||||
&& chmod -R a-w "$$dc_install_base" \
|
||||
&& ({ \
|
||||
(cd ../.. && umask 077 && mkdir "$$dc_destdir") \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
|
||||
distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
|
||||
} || { rm -rf "$$dc_destdir"; exit 1; }) \
|
||||
&& rm -rf "$$dc_destdir" \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dist \
|
||||
&& rm -rf $(DIST_ARCHIVES) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck
|
||||
$(am__remove_distdir)
|
||||
@(echo "$(distdir) archives ready for distribution: "; \
|
||||
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
|
||||
sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}'
|
||||
distuninstallcheck:
|
||||
@cd $(distuninstallcheck_dir) \
|
||||
&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
|
||||
|| { echo "ERROR: files left after uninstall:" ; \
|
||||
if test -n "$(DESTDIR)"; then \
|
||||
echo " (check DESTDIR support)"; \
|
||||
fi ; \
|
||||
$(distuninstallcheck_listfiles) ; \
|
||||
exit 1; } >&2
|
||||
distcleancheck: distclean
|
||||
@if test '$(srcdir)' = . ; then \
|
||||
echo "ERROR: distcleancheck can only run from a VPATH build" ; \
|
||||
exit 1 ; \
|
||||
fi
|
||||
@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
|
||||
|| { echo "ERROR: files left in build directory after distclean:" ; \
|
||||
$(distcleancheck_listfiles) ; \
|
||||
exit 1; } >&2
|
||||
check-am: all-am
|
||||
check: check-recursive
|
||||
all-am: Makefile
|
||||
installdirs: installdirs-recursive
|
||||
installdirs-am:
|
||||
install: install-recursive
|
||||
install-exec: install-exec-recursive
|
||||
install-data: install-data-recursive
|
||||
uninstall: uninstall-recursive
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-recursive
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-recursive
|
||||
|
||||
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||
|
||||
distclean: distclean-recursive
|
||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic distclean-libtool \
|
||||
distclean-tags
|
||||
|
||||
dvi: dvi-recursive
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-recursive
|
||||
|
||||
info: info-recursive
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-info: install-info-recursive
|
||||
|
||||
install-man:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-recursive
|
||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||
-rm -rf $(top_srcdir)/autom4te.cache
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-recursive
|
||||
|
||||
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||
|
||||
pdf: pdf-recursive
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-recursive
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-info-am
|
||||
|
||||
uninstall-info: uninstall-info-recursive
|
||||
|
||||
.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \
|
||||
check-am clean clean-generic clean-libtool clean-recursive \
|
||||
ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \
|
||||
dist-shar dist-tarZ dist-zip distcheck distclean \
|
||||
distclean-generic distclean-libtool distclean-recursive \
|
||||
distclean-tags distcleancheck distdir distuninstallcheck dvi \
|
||||
dvi-am html html-am info info-am install install-am \
|
||||
install-data install-data-am install-exec install-exec-am \
|
||||
install-info install-info-am install-man install-strip \
|
||||
installcheck installcheck-am installdirs installdirs-am \
|
||||
maintainer-clean maintainer-clean-generic \
|
||||
maintainer-clean-recursive mostlyclean mostlyclean-generic \
|
||||
mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \
|
||||
tags tags-recursive uninstall uninstall-am uninstall-info-am
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
0
NEWS
0
NEWS
81
SConstruct
Normal file
81
SConstruct
Normal file
|
@ -0,0 +1,81 @@
|
|||
#mapnik SConctruct
|
||||
|
||||
import os
|
||||
|
||||
#edit 'settings.py' to match your system settings
|
||||
opts = Options('settings.py')
|
||||
|
||||
opts.Add('PREFIX', 'Set the install "prefix"', '/opt/mapnik')
|
||||
opts.Add(PathOption('BOOST_ROOT','boost source root directory','/opt/boost'))
|
||||
opts.Add(PathOption('AGG_ROOT','agg source root directory','/opt/agg23'))
|
||||
opts.Add(PathOption('FREETYPE2_ROOT','freetype2 root directory','/opt/freetype2'))
|
||||
opts.Add(PathOption('PYTHON_ROOT','python root directory','/opt/python'))
|
||||
opts.Add('PYTHON_VERSION','python version','2.4')
|
||||
opts.Add(ListOption('DATASOURCES','list of available datasources','postgis',['postgis']))
|
||||
opts.Add('POSTGRESQL_ROOT','path to postgresql prefix','/usr/local')
|
||||
|
||||
platform = ARGUMENTS.get("OS",Platform())
|
||||
|
||||
build_dir = 'build'
|
||||
build_prefix = build_dir+'/'+str(platform)
|
||||
|
||||
cxx = 'g++'
|
||||
|
||||
env = Environment(CXX=cxx,ENV=os.environ, options=opts)
|
||||
|
||||
cxx_debug='-Wall -ftemplate-depth-100 -O0 -fno-inline -g -pthread'
|
||||
cxx_release='-Wall -ftemplate-depth-100 -O2 -finline-functions -Wno-inline -pthread -DNDEBUG'
|
||||
|
||||
release_env = env.Copy(CXXFLAGS = cxx_release)
|
||||
debug_env = env.Copy(CXXFLAGS = cxx_debug)
|
||||
|
||||
if ARGUMENTS.get('debug',0):
|
||||
env.Append(CXXFLAGS = cxx_debug)
|
||||
build_prefix+='/debug'
|
||||
else:
|
||||
env.Append(CXXFLAGS = cxx_release)
|
||||
build_prefix+='/release'
|
||||
|
||||
Help(opts.GenerateHelpText(env))
|
||||
|
||||
conf = Configure(env)
|
||||
|
||||
if not conf.CheckLibWithHeader('ltdl','ltdl.h','C'):
|
||||
print 'Could not find libltdl/headers , exiting!'
|
||||
Exit(1)
|
||||
|
||||
if not conf.CheckLib('z'):
|
||||
print 'Could not find libz , exiting!'
|
||||
Exit(1)
|
||||
|
||||
if not conf.CheckLibWithHeader('png','png.h','C'):
|
||||
print 'Could not find libpng/headers, exiting!'
|
||||
Exit(1)
|
||||
|
||||
if not conf.CheckLib('jpeg'):
|
||||
print 'Could not find jpeg lib, exiting!'
|
||||
Exit(1)
|
||||
|
||||
env = conf.Finish()
|
||||
|
||||
Export('env')
|
||||
|
||||
#build boost libs (filesystem, regex, python)
|
||||
env.SConscript('boost/SConscript')
|
||||
|
||||
#build agg lib
|
||||
env.SConscript('agg/SConscript')
|
||||
|
||||
#main lib
|
||||
SConscript('src/SConscript')
|
||||
|
||||
#python ext
|
||||
SConscript('python/SConscript')
|
||||
|
||||
#datasources
|
||||
for datasource in Split(env['DATASOURCES']):
|
||||
env.BuildDir('build/datasources/'+datasource,'src/datasources/'+datasource,duplicate=0)
|
||||
SConscript('datasources/'+datasource+'/SConscript')
|
||||
|
||||
|
||||
|
82
acinclude.m4
82
acinclude.m4
|
@ -1,82 +0,0 @@
|
|||
# debug build of libxmap
|
||||
AC_DEFUN([AP_ENABLE_DEBUG],
|
||||
[AC_ARG_ENABLE(debug,
|
||||
[AC_HELP_STRING([--enable-debug],[build a debug version of libxmap])],
|
||||
[xmap_debug_build=yes
|
||||
CXXFLAGS="-Wall -g -O0"],
|
||||
[xmap_debug_build=no])
|
||||
])
|
||||
|
||||
#check for freetype2 installation
|
||||
AC_DEFUN([AP_CHECK_FREETYPE2_NEW],
|
||||
[AC_MSG_CHECKING([for freetype2 installation])
|
||||
PKG_CHECK_MODULES(freetype2, freetype2 >= 7.0.1)
|
||||
AC_SUBST(FREETYPE2_CFLAGS)
|
||||
AC_SUBST(FREETYPE2_LIBS)]
|
||||
)
|
||||
|
||||
AC_DEFUN([AP_CHECK_FREETYPE2],
|
||||
[AC_MSG_CHECKING([for freetype2 installation])
|
||||
AC_ARG_WITH(freetype2,
|
||||
[AC_HELP_STRING([--with-freetype2=DIR],[prefix of freetype2 installation. e.g /usr/local or /usr])],
|
||||
|
||||
[FREETYPE2_PREFIX=$with_freetype2],
|
||||
AC_MSG_ERROR([You must call configure with the --with-freetype2 option.
|
||||
This tells configure where to find the freetype2 library and headers.
|
||||
e.g. --with-freetype2=/usr/local or --with-freetype2=/usr])
|
||||
)
|
||||
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_SUBST(FREETYPE2_PREFIX)
|
||||
FREETYPE2_LIBS="-L${FREETYPE2_PREFIX}/lib -lfreetype"
|
||||
FREETYPE2_CFLAGS="-I${FREETYPE2_PREFIX}/include/freetype2"
|
||||
AC_SUBST(FREETYPE2_LIBS)
|
||||
AC_SUBST(FREETYPE2_CFLAGS)
|
||||
])
|
||||
|
||||
# check for postgresql installation
|
||||
AC_DEFUN([AP_CHECK_POSTGRESQL],
|
||||
[AC_MSG_CHECKING([for postgresql installation])
|
||||
AC_ARG_WITH(postgresql,
|
||||
[AC_HELP_STRING([--with-postgresql=DIR],[prefix of postgresql installation. e.g /usr/local or /usr])],
|
||||
[POSTGRESQL_PREFIX=$with_postgresql],
|
||||
AC_MSG_ERROR([You must call configure with the --with-postgresql option.
|
||||
This tells configure where to find the postgresql library and headers.
|
||||
e.g. --with-postgresql=/usr/local or --with-postgresql=/usr])
|
||||
)
|
||||
AC_SUBST(POSTGRESQL_PREFIX)
|
||||
POSTGRESQL_LIBS="-L${POSTGRESQL_PREFIX}/lib -lpq"
|
||||
POSTGRESQL_CFLAGS="-I${POSTGRESQL_PREFIX}/include"
|
||||
AC_SUBST(POSTGRESQL_LIBS)
|
||||
AC_SUBST(POSTGRESQL_CFLAGS)
|
||||
])
|
||||
|
||||
# check for libtiff installation
|
||||
AC_DEFUN([AP_CHECK_LIBTIFF],
|
||||
[AC_MSG_CHECKING([for libtiff installation])
|
||||
AC_ARG_WITH([tiff-dir],[AC_HELP_STRING(
|
||||
[--with-tiff-dir=DIR],[directory to look for tiff libraries and headers])],
|
||||
[if test "$withval" != no ; then
|
||||
AC_MSG_RESULT(yes)
|
||||
TIFF_HOME="$withval"
|
||||
if test "$withval" = "yes" ; then
|
||||
TIFF_HOME="/usr/local"
|
||||
fi
|
||||
AC_CHECK_LIB(tiff,TIFFReadRGBAStrip,
|
||||
AC_CHECK_LIB(tiff,TIFFReadRGBATile, [HAVE_LIBTIFF="yes"] [AC_SUBST([TIFF_LDFLAGS],["-L${TIFF_HOME} -ltiff"])],
|
||||
[AC_MSG_RESULT(no)],)
|
||||
,[AC_MSG_RESULT(no)],)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
AC_MSG_ERROR([sorry, libtiff needed try --with-tiff-dir=<DIR>])
|
||||
fi
|
||||
],
|
||||
[
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_CHECK_LIB(tiff,TIFFReadRGBAStrip,
|
||||
[AC_CHECK_LIB(tiff,TIFFReadRGBATile,[HAVE_LIBTIFF="yes"] [AC_SUBST([TIFF_LDFLAGS],["-ltiff"])],
|
||||
[AC_MSG_ERROR([sorry, libtiff needed try --with-tiff-dir=<DIR>])],)]
|
||||
,[AC_MSG_ERROR([sorry, libtiff needed try --with-tiff-dir=<DIR>])],)
|
||||
])
|
||||
])
|
||||
|
6986
aclocal.m4
vendored
6986
aclocal.m4
vendored
File diff suppressed because it is too large
Load diff
10
agg/SConscript
Normal file
10
agg/SConscript
Normal file
|
@ -0,0 +1,10 @@
|
|||
#
|
||||
import glob
|
||||
|
||||
Import('env')
|
||||
prefix = env['PREFIX']
|
||||
agg_root = env['AGG_ROOT']
|
||||
agg_headers = agg_root + '/include'
|
||||
agg_src_dir = agg_root + '/src/'
|
||||
agg_src = glob.glob(agg_src_dir + '*.cpp')
|
||||
agg_lib = env.StaticLibrary('libagg',agg_src,CPPPATH=agg_headers)
|
21
boost/SConscript
Normal file
21
boost/SConscript
Normal file
|
@ -0,0 +1,21 @@
|
|||
##
|
||||
import glob
|
||||
|
||||
Import('env')
|
||||
|
||||
prefix = env['PREFIX']
|
||||
boost_root = env['BOOST_ROOT']
|
||||
|
||||
# boost filesystem
|
||||
filesystem_src_dir = boost_root + '/libs/filesystem/src/'
|
||||
boost_fs_src= glob.glob(filesystem_src_dir + '*.cpp')
|
||||
lib_boost_filesystem = env.SharedLibrary('libboost-filesystem',boost_fs_src,CPPPATH=boost_root)
|
||||
env.Install(prefix+'/lib',lib_boost_filesystem)
|
||||
#boost regex
|
||||
regex_src_dir = boost_root + '/libs/regex/src/'
|
||||
boost_regex_src = glob.glob(regex_src_dir+ '*.cpp')
|
||||
lib_boost_regex = env.SharedLibrary('libboost-regex',boost_regex_src,CPPPATH=boost_root)
|
||||
|
||||
env.Install(prefix+'/lib',lib_boost_regex)
|
||||
|
||||
|
1447
config.guess
vendored
1447
config.guess
vendored
File diff suppressed because it is too large
Load diff
548
config.rpath
548
config.rpath
|
@ -1,548 +0,0 @@
|
|||
#! /bin/sh
|
||||
# Output a system dependent set of variables, describing how to set the
|
||||
# run time search path of shared libraries in an executable.
|
||||
#
|
||||
# Copyright 1996-2003 Free Software Foundation, Inc.
|
||||
# Taken from GNU libtool, 2001
|
||||
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
#
|
||||
# The first argument passed to this file is the canonical host specification,
|
||||
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
|
||||
# or
|
||||
# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
|
||||
# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld
|
||||
# should be set by the caller.
|
||||
#
|
||||
# The set of defined variables is at the end of this script.
|
||||
|
||||
# Known limitations:
|
||||
# - On IRIX 6.5 with CC="cc", the run time search patch must not be longer
|
||||
# than 256 bytes, otherwise the compiler driver will dump core. The only
|
||||
# known workaround is to choose shorter directory names for the build
|
||||
# directory and/or the installation directory.
|
||||
|
||||
# All known linkers require a `.a' archive for static linking (except M$VC,
|
||||
# which needs '.lib').
|
||||
libext=a
|
||||
shrext=.so
|
||||
|
||||
host="$1"
|
||||
host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
|
||||
host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
|
||||
host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
|
||||
|
||||
# Code taken from libtool.m4's AC_LIBTOOL_PROG_COMPILER_PIC.
|
||||
|
||||
wl=
|
||||
if test "$GCC" = yes; then
|
||||
wl='-Wl,'
|
||||
else
|
||||
case "$host_os" in
|
||||
aix*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
mingw* | pw32* | os2*)
|
||||
;;
|
||||
hpux9* | hpux10* | hpux11*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
irix5* | irix6* | nonstopux*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
newsos6)
|
||||
;;
|
||||
linux*)
|
||||
case $CC in
|
||||
icc|ecc)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
ccc)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
osf3* | osf4* | osf5*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
sco3.2v5*)
|
||||
;;
|
||||
solaris*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
sunos4*)
|
||||
wl='-Qoption ld '
|
||||
;;
|
||||
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
sysv4*MP*)
|
||||
;;
|
||||
uts4*)
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# Code taken from libtool.m4's AC_LIBTOOL_PROG_LD_SHLIBS.
|
||||
|
||||
hardcode_libdir_flag_spec=
|
||||
hardcode_libdir_separator=
|
||||
hardcode_direct=no
|
||||
hardcode_minus_L=no
|
||||
|
||||
case "$host_os" in
|
||||
cygwin* | mingw* | pw32*)
|
||||
# FIXME: the MSVC++ port hasn't been tested in a loooong time
|
||||
# When not using gcc, we currently assume that we are using
|
||||
# Microsoft Visual C++.
|
||||
if test "$GCC" != yes; then
|
||||
with_gnu_ld=no
|
||||
fi
|
||||
;;
|
||||
openbsd*)
|
||||
with_gnu_ld=no
|
||||
;;
|
||||
esac
|
||||
|
||||
ld_shlibs=yes
|
||||
if test "$with_gnu_ld" = yes; then
|
||||
case "$host_os" in
|
||||
aix3* | aix4* | aix5*)
|
||||
# On AIX/PPC, the GNU linker is very broken
|
||||
if test "$host_cpu" != ia64; then
|
||||
ld_shlibs=no
|
||||
fi
|
||||
;;
|
||||
amigaos*)
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
hardcode_minus_L=yes
|
||||
# Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
|
||||
# that the semantics of dynamic libraries on AmigaOS, at least up
|
||||
# to version 4, is to share data among multiple programs linked
|
||||
# with the same dynamic library. Since this doesn't match the
|
||||
# behavior of shared libraries on other platforms, we can use
|
||||
# them.
|
||||
ld_shlibs=no
|
||||
;;
|
||||
beos*)
|
||||
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
|
||||
:
|
||||
else
|
||||
ld_shlibs=no
|
||||
fi
|
||||
;;
|
||||
cygwin* | mingw* | pw32*)
|
||||
# hardcode_libdir_flag_spec is actually meaningless, as there is
|
||||
# no search path for DLLs.
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
|
||||
:
|
||||
else
|
||||
ld_shlibs=no
|
||||
fi
|
||||
;;
|
||||
netbsd*)
|
||||
;;
|
||||
solaris* | sysv5*)
|
||||
if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
|
||||
ld_shlibs=no
|
||||
elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
|
||||
:
|
||||
else
|
||||
ld_shlibs=no
|
||||
fi
|
||||
;;
|
||||
sunos4*)
|
||||
hardcode_direct=yes
|
||||
;;
|
||||
*)
|
||||
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
|
||||
:
|
||||
else
|
||||
ld_shlibs=no
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
if test "$ld_shlibs" = yes; then
|
||||
# Unlike libtool, we use -rpath here, not --rpath, since the documented
|
||||
# option of GNU ld is called -rpath, not --rpath.
|
||||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
||||
fi
|
||||
else
|
||||
case "$host_os" in
|
||||
aix3*)
|
||||
# Note: this linker hardcodes the directories in LIBPATH if there
|
||||
# are no directories specified by -L.
|
||||
hardcode_minus_L=yes
|
||||
if test "$GCC" = yes; then
|
||||
# Neither direct hardcoding nor static linking is supported with a
|
||||
# broken collect2.
|
||||
hardcode_direct=unsupported
|
||||
fi
|
||||
;;
|
||||
aix4* | aix5*)
|
||||
if test "$host_cpu" = ia64; then
|
||||
# On IA64, the linker does run time linking by default, so we don't
|
||||
# have to do anything special.
|
||||
aix_use_runtimelinking=no
|
||||
else
|
||||
aix_use_runtimelinking=no
|
||||
# Test if we are trying to use run time linking or normal
|
||||
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
|
||||
# need to do runtime linking.
|
||||
case $host_os in aix4.[23]|aix4.[23].*|aix5*)
|
||||
for ld_flag in $LDFLAGS; do
|
||||
if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
|
||||
aix_use_runtimelinking=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
esac
|
||||
fi
|
||||
hardcode_direct=yes
|
||||
hardcode_libdir_separator=':'
|
||||
if test "$GCC" = yes; then
|
||||
case $host_os in aix4.[012]|aix4.[012].*)
|
||||
collect2name=`${CC} -print-prog-name=collect2`
|
||||
if test -f "$collect2name" && \
|
||||
strings "$collect2name" | grep resolve_lib_name >/dev/null
|
||||
then
|
||||
# We have reworked collect2
|
||||
hardcode_direct=yes
|
||||
else
|
||||
# We have old collect2
|
||||
hardcode_direct=unsupported
|
||||
hardcode_minus_L=yes
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
hardcode_libdir_separator=
|
||||
fi
|
||||
esac
|
||||
fi
|
||||
# Begin _LT_AC_SYS_LIBPATH_AIX.
|
||||
echo 'int main () { return 0; }' > conftest.c
|
||||
${CC} ${LDFLAGS} conftest.c -o conftest
|
||||
aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
|
||||
}'`
|
||||
if test -z "$aix_libpath"; then
|
||||
aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
|
||||
}'`
|
||||
fi
|
||||
if test -z "$aix_libpath"; then
|
||||
aix_libpath="/usr/lib:/lib"
|
||||
fi
|
||||
rm -f conftest.c conftest
|
||||
# End _LT_AC_SYS_LIBPATH_AIX.
|
||||
if test "$aix_use_runtimelinking" = yes; then
|
||||
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
|
||||
else
|
||||
if test "$host_cpu" = ia64; then
|
||||
hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
|
||||
else
|
||||
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
amigaos*)
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
hardcode_minus_L=yes
|
||||
# see comment about different semantics on the GNU ld section
|
||||
ld_shlibs=no
|
||||
;;
|
||||
bsdi4*)
|
||||
;;
|
||||
cygwin* | mingw* | pw32*)
|
||||
# When not using gcc, we currently assume that we are using
|
||||
# Microsoft Visual C++.
|
||||
# hardcode_libdir_flag_spec is actually meaningless, as there is
|
||||
# no search path for DLLs.
|
||||
hardcode_libdir_flag_spec=' '
|
||||
libext=lib
|
||||
;;
|
||||
darwin* | rhapsody*)
|
||||
if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then
|
||||
hardcode_direct=no
|
||||
fi
|
||||
;;
|
||||
dgux*)
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
;;
|
||||
freebsd1*)
|
||||
ld_shlibs=no
|
||||
;;
|
||||
freebsd2.2*)
|
||||
hardcode_libdir_flag_spec='-R$libdir'
|
||||
hardcode_direct=yes
|
||||
;;
|
||||
freebsd2*)
|
||||
hardcode_direct=yes
|
||||
hardcode_minus_L=yes
|
||||
;;
|
||||
freebsd*)
|
||||
hardcode_libdir_flag_spec='-R$libdir'
|
||||
hardcode_direct=yes
|
||||
;;
|
||||
hpux9*)
|
||||
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
|
||||
hardcode_libdir_separator=:
|
||||
hardcode_direct=yes
|
||||
# hardcode_minus_L: Not really in the search PATH,
|
||||
# but as the default location of the library.
|
||||
hardcode_minus_L=yes
|
||||
;;
|
||||
hpux10* | hpux11*)
|
||||
if test "$with_gnu_ld" = no; then
|
||||
case "$host_cpu" in
|
||||
hppa*64*)
|
||||
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
|
||||
hardcode_libdir_separator=:
|
||||
hardcode_direct=no
|
||||
;;
|
||||
ia64*)
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
hardcode_direct=no
|
||||
# hardcode_minus_L: Not really in the search PATH,
|
||||
# but as the default location of the library.
|
||||
hardcode_minus_L=yes
|
||||
;;
|
||||
*)
|
||||
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
|
||||
hardcode_libdir_separator=:
|
||||
hardcode_direct=yes
|
||||
# hardcode_minus_L: Not really in the search PATH,
|
||||
# but as the default location of the library.
|
||||
hardcode_minus_L=yes
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
;;
|
||||
irix5* | irix6* | nonstopux*)
|
||||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
||||
hardcode_libdir_separator=:
|
||||
;;
|
||||
netbsd*)
|
||||
hardcode_libdir_flag_spec='-R$libdir'
|
||||
hardcode_direct=yes
|
||||
;;
|
||||
newsos6)
|
||||
hardcode_direct=yes
|
||||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
||||
hardcode_libdir_separator=:
|
||||
;;
|
||||
openbsd*)
|
||||
hardcode_direct=yes
|
||||
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
|
||||
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
|
||||
else
|
||||
case "$host_os" in
|
||||
openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
|
||||
hardcode_libdir_flag_spec='-R$libdir'
|
||||
;;
|
||||
*)
|
||||
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
;;
|
||||
os2*)
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
hardcode_minus_L=yes
|
||||
;;
|
||||
osf3*)
|
||||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
||||
hardcode_libdir_separator=:
|
||||
;;
|
||||
osf4* | osf5*)
|
||||
if test "$GCC" = yes; then
|
||||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
||||
else
|
||||
# Both cc and cxx compiler support -rpath directly
|
||||
hardcode_libdir_flag_spec='-rpath $libdir'
|
||||
fi
|
||||
hardcode_libdir_separator=:
|
||||
;;
|
||||
sco3.2v5*)
|
||||
;;
|
||||
solaris*)
|
||||
hardcode_libdir_flag_spec='-R$libdir'
|
||||
;;
|
||||
sunos4*)
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
hardcode_direct=yes
|
||||
hardcode_minus_L=yes
|
||||
;;
|
||||
sysv4)
|
||||
case $host_vendor in
|
||||
sni)
|
||||
hardcode_direct=yes # is this really true???
|
||||
;;
|
||||
siemens)
|
||||
hardcode_direct=no
|
||||
;;
|
||||
motorola)
|
||||
hardcode_direct=no #Motorola manual says yes, but my tests say they lie
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
sysv4.3*)
|
||||
;;
|
||||
sysv4*MP*)
|
||||
if test -d /usr/nec; then
|
||||
ld_shlibs=yes
|
||||
fi
|
||||
;;
|
||||
sysv4.2uw2*)
|
||||
hardcode_direct=yes
|
||||
hardcode_minus_L=no
|
||||
;;
|
||||
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*)
|
||||
;;
|
||||
sysv5*)
|
||||
hardcode_libdir_flag_spec=
|
||||
;;
|
||||
uts4*)
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
;;
|
||||
*)
|
||||
ld_shlibs=no
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# Check dynamic linker characteristics
|
||||
# Code taken from libtool.m4's AC_LIBTOOL_SYS_DYNAMIC_LINKER.
|
||||
libname_spec='lib$name'
|
||||
case "$host_os" in
|
||||
aix3*)
|
||||
;;
|
||||
aix4* | aix5*)
|
||||
;;
|
||||
amigaos*)
|
||||
;;
|
||||
beos*)
|
||||
;;
|
||||
bsdi4*)
|
||||
;;
|
||||
cygwin* | mingw* | pw32*)
|
||||
shrext=.dll
|
||||
;;
|
||||
darwin* | rhapsody*)
|
||||
shrext=.dylib
|
||||
;;
|
||||
dgux*)
|
||||
;;
|
||||
freebsd1*)
|
||||
;;
|
||||
freebsd*)
|
||||
;;
|
||||
gnu*)
|
||||
;;
|
||||
hpux9* | hpux10* | hpux11*)
|
||||
case "$host_cpu" in
|
||||
ia64*)
|
||||
shrext=.so
|
||||
;;
|
||||
hppa*64*)
|
||||
shrext=.sl
|
||||
;;
|
||||
*)
|
||||
shrext=.sl
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
irix5* | irix6* | nonstopux*)
|
||||
case "$host_os" in
|
||||
irix5* | nonstopux*)
|
||||
libsuff= shlibsuff=
|
||||
;;
|
||||
*)
|
||||
case $LD in
|
||||
*-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;;
|
||||
*-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;;
|
||||
*-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;;
|
||||
*) libsuff= shlibsuff= ;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
linux*oldld* | linux*aout* | linux*coff*)
|
||||
;;
|
||||
linux*)
|
||||
;;
|
||||
netbsd*)
|
||||
;;
|
||||
newsos6)
|
||||
;;
|
||||
nto-qnx)
|
||||
;;
|
||||
openbsd*)
|
||||
;;
|
||||
os2*)
|
||||
libname_spec='$name'
|
||||
shrext=.dll
|
||||
;;
|
||||
osf3* | osf4* | osf5*)
|
||||
;;
|
||||
sco3.2v5*)
|
||||
;;
|
||||
solaris*)
|
||||
;;
|
||||
sunos4*)
|
||||
;;
|
||||
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
|
||||
;;
|
||||
sysv4*MP*)
|
||||
;;
|
||||
uts4*)
|
||||
;;
|
||||
esac
|
||||
|
||||
sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
|
||||
escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"`
|
||||
shlibext=`echo "$shrext" | sed -e 's,^\.,,'`
|
||||
escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
|
||||
|
||||
sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF
|
||||
|
||||
# How to pass a linker flag through the compiler.
|
||||
wl="$escaped_wl"
|
||||
|
||||
# Static library suffix (normally "a").
|
||||
libext="$libext"
|
||||
|
||||
# Shared library suffix (normally "so").
|
||||
shlibext="$shlibext"
|
||||
|
||||
# Flag to hardcode \$libdir into a binary during linking.
|
||||
# This must work even if \$libdir does not exist.
|
||||
hardcode_libdir_flag_spec="$escaped_hardcode_libdir_flag_spec"
|
||||
|
||||
# Whether we need a single -rpath flag with a separated argument.
|
||||
hardcode_libdir_separator="$hardcode_libdir_separator"
|
||||
|
||||
# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
|
||||
# resulting binary.
|
||||
hardcode_direct="$hardcode_direct"
|
||||
|
||||
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
|
||||
# resulting binary.
|
||||
hardcode_minus_L="$hardcode_minus_L"
|
||||
|
||||
EOF
|
1555
config.sub
vendored
1555
config.sub
vendored
File diff suppressed because it is too large
Load diff
94
configure.ac
94
configure.ac
|
@ -1,94 +0,0 @@
|
|||
#
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
AC_PREREQ(2.59)
|
||||
AC_INIT([mapnik],[0.1])
|
||||
AC_CONFIG_HEADERS([include/config.hh])
|
||||
AC_REVISION([$Revision: 1.1 $])
|
||||
AC_CONFIG_SRCDIR([src/params.cc])
|
||||
AM_INIT_AUTOMAKE([dist-bzip2])
|
||||
|
||||
AC_LIBTOOL_DLOPEN
|
||||
AC_CONFIG_SUBDIRS(libltdl utils/shapeindex)
|
||||
|
||||
AC_LIBLTDL_CONVENIENCE
|
||||
AC_PROG_LIBTOOL
|
||||
|
||||
AC_SUBST(INCLTDL)
|
||||
AC_SUBST(LIBLTDL)
|
||||
# Checks for programs.
|
||||
AC_PROG_CC
|
||||
AC_PROG_CXX
|
||||
|
||||
AC_HEADER_STDC
|
||||
|
||||
# Checks for libraries.
|
||||
AC_CHECK_LIB(m,floor)
|
||||
AC_CHECK_LIB(png,png_read_info)
|
||||
AC_CHECK_LIB(jpeg,jpeg_read_header)
|
||||
AC_C_BIGENDIAN
|
||||
# Checks for header files.
|
||||
AC_HEADER_DIRENT
|
||||
AC_HEADER_STDC
|
||||
AC_CHECK_HEADERS([string.h sys/time.h unistd.h])
|
||||
AC_CHECK_HEADER(png.h,,AC_MSG_ERROR(install png-devel))
|
||||
AC_CHECK_HEADER(jpeglib.h,,AC_MSG_ERROR(install jpeg-devel))
|
||||
|
||||
# Checks for typedefs, structures, and compiler characteristics.
|
||||
AC_HEADER_STDBOOL
|
||||
AC_C_CONST
|
||||
AC_C_INLINE
|
||||
AC_TYPE_SIZE_T
|
||||
AC_HEADER_TIME
|
||||
AC_C_VOLATILE
|
||||
|
||||
# Checks for library functions.
|
||||
AC_FUNC_CLOSEDIR_VOID
|
||||
AC_FUNC_MALLOC
|
||||
AC_CHECK_FUNCS([floor gettimeofday memset pow sqrt])
|
||||
|
||||
AP_ENABLE_DEBUG
|
||||
#AP_CHECK_FREETYPE2
|
||||
|
||||
# check if shape is enabled
|
||||
AC_ARG_ENABLE([shape],AC_HELP_STRING([--enable-shape],
|
||||
[enable shape datasource plugin (default is YES)]), [package_shape_enabled=$enableval], [package_shape_enabled=yes])
|
||||
|
||||
AC_CACHE_CHECK([whether to enable shape datasource],
|
||||
[package_shape_enabled], [package_shape_enabled=yes])
|
||||
|
||||
# check if raster datasource is enabled
|
||||
AC_ARG_ENABLE([raster],AC_HELP_STRING([--enable-raster],
|
||||
[enable raster datasource plugin (default is NO)]), [package_raster_enabled=$enableval], [package_raster_enabled=no])
|
||||
|
||||
AC_CACHE_CHECK([whether to enable raster datasource],
|
||||
[package_raster_enabled], [package_raster_enabled=no])
|
||||
|
||||
#config_files=Makefile po/Makefile m4/Makefile src/Makefile
|
||||
if test "$package_raster_enabled" = yes ; then
|
||||
AP_CHECK_LIBTIFF
|
||||
#config_files="${config_files} src/raster/Makefile"
|
||||
fi
|
||||
|
||||
# check if postgis datasource is enabled
|
||||
AC_ARG_ENABLE([postgis],AC_HELP_STRING([--enable-postgis],
|
||||
[enable postgis datasource plugin (default is NO)]), [package_postgis_enabled=$enableval], [package_postgis_enabled=no])
|
||||
|
||||
AC_CACHE_CHECK([whether to enable postgis datasource],
|
||||
[package_postgis_enabled], [package_postgis_enabled=no])
|
||||
|
||||
if test "$package_postgis_enabled" = yes ; then
|
||||
AP_CHECK_POSTGRESQL
|
||||
fi
|
||||
|
||||
AC_CONFIG_FILES([Makefile m4/Makefile include/Makefile src/Makefile src/shape/Makefile src/raster/Makefile src/postgis/Makefile])
|
||||
|
||||
AC_SUBST([pluginsdir],["${prefix}/plugins"])
|
||||
AC_DEFINE_UNQUOTED([_DATASOURCE_PLUGINS_DIR],["$pluginsdir"],[datasource plugins dir])
|
||||
|
||||
AM_CONDITIONAL([BUILD_TIFF_READER],[test "$HAVE_LIBTIFF" = yes])
|
||||
AM_CONDITIONAL([SHAPE_DATASOURCE],[test "$package_shape_enabled" = yes ])
|
||||
AM_CONDITIONAL([RASTER_DATASOURCE],[test "$package_raster_enabled" = yes])
|
||||
AM_CONDITIONAL([POSTGIS_DATASOURCE],[test "$package_postgis_enabled" = yes])
|
||||
|
||||
|
||||
AC_OUTPUT
|
|
@ -1,33 +0,0 @@
|
|||
# -*- Autoconf -*-
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_PREREQ(2.59)
|
||||
AC_INIT(FULL-PACKAGE-NAME, VERSION, BUG-REPORT-ADDRESS)
|
||||
AC_CONFIG_SRCDIR([src/params.cc])
|
||||
AC_CONFIG_HEADER([config.h])
|
||||
|
||||
# Checks for programs.
|
||||
AC_PROG_CXX
|
||||
|
||||
# Checks for libraries.
|
||||
|
||||
# Checks for header files.
|
||||
AC_HEADER_DIRENT
|
||||
AC_HEADER_STDC
|
||||
AC_CHECK_HEADERS([string.h sys/time.h unistd.h])
|
||||
|
||||
# Checks for typedefs, structures, and compiler characteristics.
|
||||
AC_HEADER_STDBOOL
|
||||
AC_C_CONST
|
||||
AC_C_INLINE
|
||||
AC_TYPE_SIZE_T
|
||||
AC_HEADER_TIME
|
||||
AC_C_VOLATILE
|
||||
|
||||
# Checks for library functions.
|
||||
AC_FUNC_CLOSEDIR_VOID
|
||||
AC_FUNC_MALLOC
|
||||
AC_CHECK_FUNCS([floor gettimeofday memset pow sqrt])
|
||||
|
||||
AC_CONFIG_FILES([Makefile])
|
||||
AC_OUTPUT
|
24
datasources/postgis/SConscript
Normal file
24
datasources/postgis/SConscript
Normal file
|
@ -0,0 +1,24 @@
|
|||
#mapnik
|
||||
|
||||
Import ('env')
|
||||
|
||||
prefix = env['PREFIX']
|
||||
boost_root = env['BOOST_ROOT']
|
||||
postgresql_root = env['POSTGRESQL_ROOT']
|
||||
agg_root = env['AGG_ROOT']
|
||||
agg_headers = agg_root + '/include'
|
||||
|
||||
postgresql_headers=postgresql_root+"/include"
|
||||
postgresql_libs=postgresql_root+"/lib"
|
||||
|
||||
postgis_src = Split(
|
||||
"""
|
||||
postgis.cpp
|
||||
postgisfs.cpp
|
||||
"""
|
||||
)
|
||||
|
||||
headers = ['#include',boost_root,agg_headers,postgresql_headers]
|
||||
postgis_datasource = env.SharedLibrary('postgis',source=postgis_src,SHLIBPREFIX='',CPPPATH=headers,LIBS="pq",LIBPATH=postgresql_libs)
|
||||
env.Install(prefix + '/datasources',postgis_datasource)
|
||||
env.Alias("install",prefix + '/datasources')
|
|
@ -16,15 +16,15 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
//$Id$
|
||||
//$Id: connection.hpp 17 2005-03-08 23:58:43Z pavlenko $
|
||||
|
||||
#ifndef CONNECTION_HH
|
||||
#define CONNECTION_HH
|
||||
#ifndef CONNECTION_HPP
|
||||
#define CONNECTION_HPP
|
||||
|
||||
|
||||
#include "libpq-fe.h"
|
||||
#include "mapnik.hh"
|
||||
#include "resultset.hh"
|
||||
#include "mapnik.hpp"
|
||||
#include "resultset.hpp"
|
||||
|
||||
using namespace mapnik;
|
||||
|
||||
|
@ -38,7 +38,7 @@ public:
|
|||
Connection(const std::string& uri,const std::string& dbname,
|
||||
const std::string& username,const std::string& password)
|
||||
{
|
||||
std::string connStr="host="+uri+" dbname="+dbname+" user="+username;
|
||||
std::string connStr="host="+uri+" dbname="+dbname+" user="+username+" password="+password;
|
||||
conn_=PQconnectdb(connStr.c_str());
|
||||
if (PQstatus(conn_) == CONNECTION_BAD)
|
||||
{
|
||||
|
@ -82,4 +82,4 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
#endif //CONNECTION_HH
|
||||
#endif //CONNECTION_HPP
|
|
@ -16,15 +16,15 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
//$Id$
|
||||
//$Id: connection_manager.hpp 17 2005-03-08 23:58:43Z pavlenko $
|
||||
|
||||
#ifndef CONNECTION_MANAGER_HH
|
||||
#define CONNECTION_MANAGER_HH
|
||||
#ifndef CONNECTION_MANAGER_HPP
|
||||
#define CONNECTION_MANAGER_HPP
|
||||
|
||||
#include <string>
|
||||
#include "pool.hh"
|
||||
#include "utils.hh"
|
||||
#include "connection.hh"
|
||||
#include "pool.hpp"
|
||||
#include "utils.hpp"
|
||||
#include "connection.hpp"
|
||||
|
||||
using namespace mapnik;
|
||||
using std::string;
|
||||
|
@ -108,4 +108,4 @@ private:
|
|||
ConnectionManager& operator=(const ConnectionManager);
|
||||
};
|
||||
|
||||
#endif //CONNECTION_MANAGER_HH
|
||||
#endif //CONNECTION_MANAGER_HPP
|
|
@ -16,35 +16,41 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
//$Id$
|
||||
//$Id: postgis.cc 44 2005-04-22 18:53:54Z pavlenko $
|
||||
|
||||
#include "postgis.hh"
|
||||
#include "postgis.hpp"
|
||||
#include <netinet/in.h>
|
||||
#include <string>
|
||||
#include <algorithm>
|
||||
|
||||
#include <set>
|
||||
#include <sstream>
|
||||
#include "connection_manager.hh"
|
||||
#include "connection_manager.hpp"
|
||||
|
||||
DATASOURCE_PLUGIN(PostgisDatasource);
|
||||
|
||||
const std::string PostgisDatasource::GEOMETRY_COLUMNS="geometry_columns";
|
||||
const std::string PostgisDatasource::SPATIAL_REF_SYS="spatial_ref_system";
|
||||
|
||||
using std::cerr;
|
||||
using std::cout;
|
||||
using std::endl;
|
||||
|
||||
using boost::lexical_cast;
|
||||
using boost::bad_lexical_cast;
|
||||
|
||||
PostgisDatasource::PostgisDatasource(const Parameters& params)
|
||||
: table_(params.get("table")),
|
||||
type_(datasource::Vector),
|
||||
desc_(params.get("name")),
|
||||
creator_(params.get("host"),
|
||||
params.get("dbname"),
|
||||
params.get("user"),
|
||||
params.get("pass")),
|
||||
type_(datasource::Vector)
|
||||
|
||||
{
|
||||
|
||||
ConnectionManager *mgr=ConnectionManager::instance();
|
||||
|
||||
params.get("password"))
|
||||
|
||||
{
|
||||
ConnectionManager *mgr=ConnectionManager::instance();
|
||||
mgr->registerPool(creator_,10,20);
|
||||
std::cout<<" pool id ="<<creator_.id()<<std::endl;
|
||||
|
||||
ref_ptr<Pool<Connection,ConnectionCreator> > pool=mgr->getPool(creator_.id());
|
||||
if (pool)
|
||||
{
|
||||
|
@ -54,7 +60,6 @@ PostgisDatasource::PostgisDatasource(const Parameters& params)
|
|||
PoolGuard<ref_ptr<Connection>,ref_ptr<Pool<Connection,ConnectionCreator> > > guard(conn,pool);
|
||||
|
||||
std::string table_name=table_from_sql(table_);
|
||||
std::cout<<"TABLE NAME="<<table_name<<std::endl;
|
||||
|
||||
std::ostringstream s;
|
||||
s << "select f_geometry_column,srid,type from ";
|
||||
|
@ -64,7 +69,15 @@ PostgisDatasource::PostgisDatasource(const Parameters& params)
|
|||
|
||||
if (rs->next())
|
||||
{
|
||||
srid_=atoi(rs->getValue("srid"));
|
||||
try
|
||||
{
|
||||
srid_ = lexical_cast<int>(rs->getValue("srid"));
|
||||
desc_.set_srid(srid_);
|
||||
}
|
||||
catch (bad_lexical_cast &ex)
|
||||
{
|
||||
cerr << ex.what() << endl;
|
||||
}
|
||||
geometryColumn_=rs->getValue("f_geometry_column");
|
||||
std::string postgisType=rs->getValue("type");
|
||||
}
|
||||
|
@ -72,19 +85,57 @@ PostgisDatasource::PostgisDatasource(const Parameters& params)
|
|||
s.str("");
|
||||
s << "select xmin(ext),ymin(ext),xmax(ext),ymax(ext)";
|
||||
s << " from (select estimated_extent('"<<table_name<<"','"<<geometryColumn_<<"') as ext) as tmp";
|
||||
std::cout<<s.str()<<"\n";
|
||||
|
||||
rs=conn->executeQuery(s.str());
|
||||
if (rs->next())
|
||||
{
|
||||
double lox,loy,hix,hiy;
|
||||
fromString(rs->getValue(0),lox);
|
||||
fromString(rs->getValue(1),loy);
|
||||
fromString(rs->getValue(2),hix);
|
||||
fromString(rs->getValue(3),hiy);
|
||||
extent_.init(lox,loy,hix,hiy);
|
||||
std::cout<<extent_<<"\n";
|
||||
try
|
||||
{
|
||||
double lox=lexical_cast<double>(rs->getValue(0));
|
||||
double loy=lexical_cast<double>(rs->getValue(1));
|
||||
double hix=lexical_cast<double>(rs->getValue(2));
|
||||
double hiy=lexical_cast<double>(rs->getValue(3));
|
||||
extent_.init(lox,loy,hix,hiy);
|
||||
}
|
||||
catch (bad_lexical_cast &ex)
|
||||
{
|
||||
cerr << ex.what() << endl;
|
||||
}
|
||||
}
|
||||
rs->close();
|
||||
|
||||
// collect attribute desc
|
||||
s.str("");
|
||||
s << "select * from "<<table_<<" limit 1";
|
||||
rs=conn->executeQuery(s.str());
|
||||
if (rs->next())
|
||||
{
|
||||
int count = rs->getNumFields();
|
||||
for (int i=0;i<count;++i)
|
||||
{
|
||||
std::string fld_name=rs->getFieldName(i);
|
||||
int length = rs->getFieldLength(i);
|
||||
|
||||
int type_oid = rs->getTypeOID(i);
|
||||
switch (type_oid)
|
||||
{
|
||||
case 17285: // geometry
|
||||
desc_.add_descriptor(attribute_descriptor(fld_name,Geometry));
|
||||
break;
|
||||
case 21: // int2
|
||||
case 23: // int4
|
||||
desc_.add_descriptor(attribute_descriptor(fld_name,Integer,false,length));
|
||||
break;
|
||||
case 1043: // varchar
|
||||
desc_.add_descriptor(attribute_descriptor(fld_name,String));
|
||||
break;
|
||||
default: // shouldn't get here
|
||||
cout << "unknown type_oid="<<type_oid<<endl;
|
||||
desc_.add_descriptor(attribute_descriptor(fld_name,String));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -101,6 +152,11 @@ int PostgisDatasource::type() const
|
|||
return type_;
|
||||
}
|
||||
|
||||
layer_descriptor const& PostgisDatasource::get_descriptor() const
|
||||
{
|
||||
return desc_;
|
||||
}
|
||||
|
||||
std::string PostgisDatasource::table_from_sql(const std::string& sql)
|
||||
{
|
||||
std::string table_name(sql);
|
||||
|
@ -119,7 +175,7 @@ std::string PostgisDatasource::table_from_sql(const std::string& sql)
|
|||
featureset_ptr PostgisDatasource::features(const query& q) const
|
||||
{
|
||||
Featureset *fs=0;
|
||||
const Envelope<double>& box=q.get_bbox();
|
||||
Envelope<double> const& box=q.get_bbox();
|
||||
ConnectionManager *mgr=ConnectionManager::instance();
|
||||
ref_ptr<Pool<Connection,ConnectionCreator> > pool=mgr->getPool(creator_.id());
|
||||
if (pool)
|
||||
|
@ -129,13 +185,22 @@ featureset_ptr PostgisDatasource::features(const query& q) const
|
|||
{
|
||||
PoolGuard<ref_ptr<Connection>,ref_ptr<Pool<Connection,ConnectionCreator> > > guard(conn,pool);
|
||||
std::ostringstream s;
|
||||
s << "select gid,asbinary("<<geometryColumn_<<") as geom from ";
|
||||
s << table_<<" where "<<geometryColumn_<<" && setSRID('BOX3D(";
|
||||
// can we rely on 'gid' name???
|
||||
s << "select gid,asbinary("<<geometryColumn_<<") as geom";
|
||||
std::set<std::string> const& props=q.property_names();
|
||||
std::set<std::string>::const_iterator pos=props.begin();
|
||||
while (pos!=props.end())
|
||||
{
|
||||
s <<",\""<<*pos<<"\"";
|
||||
++pos;
|
||||
}
|
||||
|
||||
s << " from " << table_<<" where "<<geometryColumn_<<" && setSRID('BOX3D(";
|
||||
s << box.minx() << " " << box.miny() << ",";
|
||||
s << box.maxx() << " " << box.maxy() << ")'::box3d,"<<srid_<<")";
|
||||
std::cout << s.str()<<std::endl;
|
||||
cout << s.str() << endl;
|
||||
ref_ptr<ResultSet> rs=conn->executeQuery(s.str(),1);
|
||||
fs=new PostgisFeatureset(rs);
|
||||
fs=new PostgisFeatureset(rs,props.size());
|
||||
}
|
||||
}
|
||||
return featureset_ptr(fs);
|
|
@ -16,14 +16,17 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
//$Id$
|
||||
//$Id: postgis.hpp 44 2005-04-22 18:53:54Z pavlenko $
|
||||
|
||||
#ifndef POSTGIS_HH
|
||||
#define POSTGIS_HH
|
||||
#ifndef POSTGIS_HPP
|
||||
#define POSTGIS_HPP
|
||||
|
||||
|
||||
#include "mapnik.hh"
|
||||
#include "connection_manager.hh"
|
||||
#include "mapnik.hpp"
|
||||
#include "connection_manager.hpp"
|
||||
#include <boost/lexical_cast.hpp>
|
||||
|
||||
#include <set>
|
||||
|
||||
using namespace mapnik;
|
||||
|
||||
|
@ -39,13 +42,15 @@ class PostgisDatasource : public datasource
|
|||
int type_;
|
||||
int srid_;
|
||||
mapnik::Envelope<double> extent_;
|
||||
layer_descriptor desc_;
|
||||
ConnectionCreator<Connection> creator_;
|
||||
static std::string name_;
|
||||
public:
|
||||
static std::string name();
|
||||
int type() const;
|
||||
featureset_ptr features(const query& q) const;
|
||||
const mapnik::Envelope<double>& envelope() const;
|
||||
mapnik::Envelope<double> const& envelope() const;
|
||||
layer_descriptor const& get_descriptor() const;
|
||||
PostgisDatasource(const Parameters ¶ms);
|
||||
~PostgisDatasource();
|
||||
private:
|
||||
|
@ -58,10 +63,11 @@ class PostgisFeatureset : public Featureset
|
|||
{
|
||||
private:
|
||||
ref_ptr<ResultSet> rs_;
|
||||
unsigned num_attrs_;
|
||||
mutable int totalGeomSize_;
|
||||
mutable int count_;
|
||||
public:
|
||||
PostgisFeatureset(const ref_ptr<ResultSet>& rs);
|
||||
PostgisFeatureset(const ref_ptr<ResultSet>& rs,unsigned num_attrs);
|
||||
void dispose();
|
||||
Feature* next();
|
||||
~PostgisFeatureset();
|
||||
|
@ -70,4 +76,4 @@ private:
|
|||
const PostgisFeatureset& operator=(const PostgisFeatureset&);
|
||||
};
|
||||
|
||||
#endif //POSTGIS_HH
|
||||
#endif //POSTGIS_HPP
|
|
@ -16,31 +16,63 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
//$Id$
|
||||
//$Id: postgisfs.cc 34 2005-04-04 13:27:23Z pavlenko $
|
||||
|
||||
|
||||
#include "postgis.hh"
|
||||
#include "postgis.hpp"
|
||||
|
||||
PostgisFeatureset::PostgisFeatureset(const ref_ptr<ResultSet>& rs)
|
||||
using boost::lexical_cast;
|
||||
using boost::bad_lexical_cast;
|
||||
using std::string;
|
||||
|
||||
PostgisFeatureset::PostgisFeatureset(const ref_ptr<ResultSet>& rs,
|
||||
unsigned num_attrs=0)
|
||||
: rs_(rs),
|
||||
num_attrs_(num_attrs),
|
||||
totalGeomSize_(0),
|
||||
count_(0) {}
|
||||
count_(0)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
Feature* PostgisFeatureset::next()
|
||||
{
|
||||
Feature *feature=0;
|
||||
if (rs_->next())
|
||||
{
|
||||
// read gid,srid,geometry and create feature
|
||||
int id=atoi(rs_->getValue("gid"));
|
||||
int size=rs_->getFieldLength("geom");
|
||||
const char *data=rs_->getValue("geom");
|
||||
{
|
||||
const char* buf = rs_->getValue(0);
|
||||
int id = (buf[0]&255) << 24 | (buf[1]&255) << 16 | (buf[2] & 255) << 8 | buf[3] & 255;
|
||||
|
||||
int size=rs_->getFieldLength(1);
|
||||
const char *data=rs_->getValue(1);
|
||||
geometry_ptr geom=geometry_utils::from_wkb(data,size,-1);
|
||||
|
||||
totalGeomSize_+=size;
|
||||
|
||||
if (geom)
|
||||
{
|
||||
feature=new Feature(id,geom);
|
||||
totalGeomSize_+=size;
|
||||
|
||||
unsigned start=2;
|
||||
for (unsigned pos=0;pos<num_attrs_;++pos)
|
||||
{
|
||||
const char* buf=rs_->getValue(start + pos);
|
||||
int field_size = rs_->getFieldLength(start + pos);
|
||||
int oid = rs_->getTypeOID(start + pos);
|
||||
if (oid==23)
|
||||
{
|
||||
int val = (buf[0]&255) << 24 | (buf[1]&255) << 16 | (buf[2] & 255) << 8 | buf[3] & 255;
|
||||
feature->add_property(val);
|
||||
}
|
||||
else if (oid==1043)
|
||||
{
|
||||
feature->add_property(string(buf));
|
||||
}
|
||||
else
|
||||
{
|
||||
feature->add_property(string("null"));
|
||||
}
|
||||
}
|
||||
++count_;
|
||||
}
|
||||
}
|
71
datasources/postgis/property_index.hpp
Normal file
71
datasources/postgis/property_index.hpp
Normal file
|
@ -0,0 +1,71 @@
|
|||
/* This file is part of Mapnik (c++ mapping toolkit)
|
||||
* Copyright (C) 2005 Artem Pavlenko
|
||||
*
|
||||
* Mapnik is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
//$Id$
|
||||
|
||||
#ifndef PROPERTY_VALIDATOR
|
||||
#define PROPERTY_VALIDATOR
|
||||
|
||||
#include "filter.hh"
|
||||
#include "expression.hh"
|
||||
#include <set>
|
||||
|
||||
namespace mapnik
|
||||
{
|
||||
template <typename FeatureT>
|
||||
class property_validator : public filter_visitor<FeatureT>
|
||||
{
|
||||
public:
|
||||
property_validator(layer_descriptor& desc)
|
||||
desc_(desc) {}
|
||||
|
||||
void visit(filter<FeatureT>& /*filter*/)
|
||||
{
|
||||
//not interested
|
||||
}
|
||||
void visit(expression<FeatureT>& exp)
|
||||
{
|
||||
property<FeatureT>* pf;
|
||||
if ((pf = dynamic_cast<property<FeatureT>*>(&exp)))
|
||||
{
|
||||
vector<attribute_descriptor> const& attr_desc = desc_.get_descriptors();
|
||||
for (size_t idx=0; idx < attr_desc.size();++idx)
|
||||
{
|
||||
if (attr_desc[idx] == pf->name())
|
||||
{
|
||||
pf->set_index(idx);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
std::set<std::string> const& property_names() const
|
||||
{
|
||||
return names_;
|
||||
}
|
||||
|
||||
virtual ~property_validator() {}
|
||||
private:
|
||||
property_validator(property_validator const&);
|
||||
property_validator& operator=(property_validator const&);
|
||||
private:
|
||||
layer_descriptor& desc_;
|
||||
};
|
||||
}
|
||||
|
||||
#endif //PROPERTY_HPP
|
|
@ -16,13 +16,13 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
//$Id$
|
||||
//$Id: resultset.hpp 17 2005-03-08 23:58:43Z pavlenko $
|
||||
|
||||
|
||||
#ifndef RESULTSET_HH
|
||||
#define RESULTSET_HH
|
||||
#ifndef RESULTSET_HPP
|
||||
#define RESULTSET_HPP
|
||||
|
||||
#include "connection.hh"
|
||||
#include "connection.hpp"
|
||||
|
||||
class ResultSet
|
||||
{
|
||||
|
@ -105,6 +105,19 @@ public:
|
|||
return 0;
|
||||
}
|
||||
|
||||
int getTypeOID(int index) const
|
||||
{
|
||||
return PQftype(res_,index);
|
||||
}
|
||||
|
||||
int getTypeOID(const char* name) const
|
||||
{
|
||||
int col=PQfnumber(res_,name);
|
||||
if (col>=0)
|
||||
return PQftype(res_,col);
|
||||
return 0;
|
||||
}
|
||||
|
||||
const char* getValue(int index) const
|
||||
{
|
||||
return PQgetvalue(res_,pos_,index);
|
||||
|
@ -119,7 +132,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
#endif //RESULTSET_HH
|
||||
#endif //RESULTSET_HPP
|
||||
|
||||
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
//$Id$
|
||||
//$Id: raster_datasource.cc 44 2005-04-22 18:53:54Z pavlenko $
|
||||
|
||||
#include "raster_datasource.hh"
|
||||
#include "image_reader.hh"
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
//$Id$
|
||||
//$Id: raster_datasource.hh 44 2005-04-22 18:53:54Z pavlenko $
|
||||
|
||||
#ifndef RASTER_DATASOURCE_HH
|
||||
#define RASTER_DATASOURCE_HH
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
//$Id$
|
||||
//$Id: raster_info.cc 17 2005-03-08 23:58:43Z pavlenko $
|
||||
|
||||
#include "raster_info.hh"
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
//$Id$
|
||||
//$Id: raster_info.hh 17 2005-03-08 23:58:43Z pavlenko $
|
||||
|
||||
#ifndef RASTER_INFO
|
||||
#define RASTER_INFO
|
26
datasources/shape/SConscript
Normal file
26
datasources/shape/SConscript
Normal file
|
@ -0,0 +1,26 @@
|
|||
#mapnik
|
||||
|
||||
Import ('env')
|
||||
|
||||
prefix = env['PREFIX']
|
||||
boost_root = env['BOOST_ROOT']
|
||||
agg_root = env['AGG_ROOT']
|
||||
agg_headers = agg_root + '/include'
|
||||
|
||||
shape_src = Split(
|
||||
"""
|
||||
dbffile.cc
|
||||
shape.cc
|
||||
shape_featureset.cc
|
||||
shapefile.cc
|
||||
shape_index_featureset.cc
|
||||
shape_io.cc
|
||||
shp_index.cc
|
||||
"""
|
||||
)
|
||||
|
||||
headers = ['#include',boost_root,agg_headers]
|
||||
|
||||
shape_datasource = env.SharedLibrary('shape',source=shape_src,SHLIBPREFIX='',CPPPATH=headers)
|
||||
env.Install('#stage/datasources',shape_datasource)
|
||||
#env.Default(shape_datasource)
|
|
@ -123,7 +123,7 @@ void dbf_file::add_attribute(int col,Feature* f) const throw()
|
|||
case 'M':
|
||||
case 'L':
|
||||
{
|
||||
f->add_attribute<std::string>(name,str);
|
||||
f->add_property(name,str);
|
||||
break;
|
||||
}
|
||||
case 'N':
|
||||
|
@ -135,15 +135,16 @@ void dbf_file::add_attribute(int col,Feature* f) const throw()
|
|||
}
|
||||
if (fields_[col].dec_>0)
|
||||
{
|
||||
double val;
|
||||
fromString(str,val);
|
||||
f->add_attribute<double>(name,val);
|
||||
double d;
|
||||
fromString(str,d);
|
||||
|
||||
f->add_property(name,d);
|
||||
}
|
||||
else
|
||||
{
|
||||
int val;
|
||||
fromString(str,val);
|
||||
f->add_attribute<int>(name,val);
|
||||
int i;
|
||||
fromString(str,i);
|
||||
f->add_property(name,i);
|
||||
}
|
||||
break;
|
||||
}
|
|
@ -27,9 +27,9 @@ DATASOURCE_PLUGIN(shape_datasource);
|
|||
|
||||
shape_datasource::shape_datasource(const Parameters ¶ms)
|
||||
: shape_name_(params.get("file")),
|
||||
type_(datasource::Vector),
|
||||
file_length_(0),
|
||||
indexed_(false),
|
||||
type_(datasource::Vector)
|
||||
indexed_(false)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
@ -104,7 +104,7 @@ featureset_ptr shape_datasource::features(const query& q) const
|
|||
{
|
||||
return featureset_ptr(new shape_index_featureset<filter_in_box>(filter,shape_name_,q.property_names()));
|
||||
}
|
||||
return featureset_ptr(new shape_featureset<filter_in_box>(filter,shape_name_,file_length_));
|
||||
return featureset_ptr(new shape_featureset<filter_in_box>(filter,shape_name_,q.property_names(),file_length_));
|
||||
}
|
||||
|
||||
const Envelope<double>& shape_datasource::envelope() const
|
|
@ -21,7 +21,8 @@
|
|||
|
||||
template <typename filterT>
|
||||
shape_featureset<filterT>::shape_featureset(const filterT& filter,
|
||||
const std::string& shape_file,
|
||||
const std::string& shape_file,
|
||||
const std::set<std::string>& attribute_names,
|
||||
long file_length )
|
||||
: filter_(filter),
|
||||
shape_type_(shape_io::shape_null),
|
||||
|
@ -31,6 +32,20 @@ shape_featureset<filterT>::shape_featureset(const filterT& filter,
|
|||
count_(0)
|
||||
{
|
||||
shape_.shp().skip(100);
|
||||
//attributes
|
||||
typename std::set<std::string>::const_iterator pos=attribute_names.begin();
|
||||
while (pos!=attribute_names.end())
|
||||
{
|
||||
for (int i=0;i<shape_.dbf().num_fields();++i)
|
||||
{
|
||||
if (shape_.dbf().descriptor(i).name_ == *pos)
|
||||
{
|
||||
attr_ids_.push_back(i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
++pos;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -54,11 +69,22 @@ Feature* shape_featureset<filterT>::next()
|
|||
feature=new Feature(id,point);
|
||||
++count_;
|
||||
}
|
||||
else if (type == shape_io::shape_pointm)
|
||||
{
|
||||
double x=shape_.shp().read_double();
|
||||
double y=shape_.shp().read_double();
|
||||
shape_.shp().read_double();//m
|
||||
geometry_ptr point(new point_impl(-1));
|
||||
point->move_to(x,y);
|
||||
feature=new Feature(id,point);
|
||||
++count_;
|
||||
}
|
||||
else if (type == shape_io::shape_pointz)
|
||||
{
|
||||
double x=shape_.shp().read_double();
|
||||
double y=shape_.shp().read_double();
|
||||
double z=shape_.shp().read_double();
|
||||
shape_.shp().read_double();//z
|
||||
shape_.shp().read_double();//m
|
||||
geometry_ptr point(new point_impl(-1));
|
||||
point->move_to(x,y);
|
||||
feature=new Feature(id,point);
|
||||
|
@ -70,35 +96,74 @@ Feature* shape_featureset<filterT>::next()
|
|||
{
|
||||
unsigned reclen=shape_.reclength_;
|
||||
shape_.move_to(long(shape_.shp().pos()) + 2 * reclen - 36);
|
||||
if ((unsigned long)shape_.shp().pos() >= file_length_ * 2)
|
||||
if ((long)shape_.shp().pos() >= file_length_ * 2)
|
||||
return 0;
|
||||
}
|
||||
|
||||
switch (type)
|
||||
{
|
||||
|
||||
case shape_io::shape_polyline:
|
||||
{
|
||||
geometry_ptr line = shape_.read_polyline();
|
||||
feature=new Feature(id,line);
|
||||
{
|
||||
geometry_ptr line = shape_.read_polyline();
|
||||
feature=new Feature(shape_.id_,line);
|
||||
++count_;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case shape_io::shape_polylinem:
|
||||
{
|
||||
geometry_ptr line = shape_.read_polylinem();
|
||||
feature=new Feature(shape_.id_,line);
|
||||
++count_;
|
||||
break;
|
||||
}
|
||||
case shape_io::shape_polylinez:
|
||||
{
|
||||
geometry_ptr line = shape_.read_polylinez();
|
||||
feature=new Feature(shape_.id_,line);
|
||||
++count_;
|
||||
break;
|
||||
}
|
||||
case shape_io::shape_polygon:
|
||||
{
|
||||
geometry_ptr poly = shape_.read_polygon();
|
||||
feature=new Feature(id,poly);
|
||||
{
|
||||
geometry_ptr poly = shape_.read_polygon();
|
||||
feature=new Feature(shape_.id_,poly);
|
||||
++count_;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case shape_io::shape_polygonm:
|
||||
{
|
||||
geometry_ptr poly = shape_.read_polygonm();
|
||||
feature=new Feature(shape_.id_,poly);
|
||||
++count_;
|
||||
break;
|
||||
}
|
||||
case shape_io::shape_polygonz:
|
||||
{
|
||||
geometry_ptr poly = shape_.read_polygon();
|
||||
feature=new Feature(shape_.id_,poly);
|
||||
++count_;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (0)
|
||||
if (attr_ids_.size())
|
||||
{
|
||||
shape_.dbf().move_to(id);
|
||||
for (int j=0;j<shape_.dbf().num_fields();++j) {
|
||||
shape_.dbf().add_attribute(j,feature); //TODO optimize!!!
|
||||
shape_.dbf().move_to(shape_.id_);
|
||||
typename std::vector<int>::const_iterator pos=attr_ids_.begin();
|
||||
while (pos!=attr_ids_.end())
|
||||
{
|
||||
try
|
||||
{
|
||||
shape_.dbf().add_attribute(*pos,feature);//TODO optimize!!!
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
//TODO
|
||||
}
|
||||
++pos;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -31,11 +31,13 @@ class shape_featureset : public Featureset
|
|||
shape_io shape_;
|
||||
Envelope<double> query_ext_;
|
||||
long file_length_;
|
||||
std::vector<int> attr_ids_;
|
||||
mutable Envelope<double> feature_ext_;
|
||||
mutable int total_geom_size;
|
||||
mutable int count_;
|
||||
public:
|
||||
shape_featureset(const filterT& filter, const std::string& shape_file,long file_length);
|
||||
shape_featureset(const filterT& filter, const std::string& shape_file,
|
||||
const std::set<std::string>& attribute_names,long file_length);
|
||||
virtual ~shape_featureset();
|
||||
Feature* next();
|
||||
private:
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
//$Id$
|
||||
//$Id: shape_index_featureset.cc 36 2005-04-05 14:32:18Z pavlenko $
|
||||
|
||||
#include "shape_index_featureset.hh"
|
||||
|
||||
|
@ -42,7 +42,7 @@ shape_index_featureset<filterT>::shape_index_featureset(const filterT& filter,
|
|||
itr_ = ids_.begin();
|
||||
|
||||
// deal with attributes
|
||||
typename std::set<std::string>::const_iterator pos=attribute_names.begin();
|
||||
std::set<std::string>::const_iterator pos=attribute_names.begin();
|
||||
while (pos!=attribute_names.end())
|
||||
{
|
||||
for (int i=0;i<shape_.dbf().num_fields();++i)
|
||||
|
@ -75,16 +75,27 @@ Feature* shape_index_featureset<filterT>::next()
|
|||
f=new Feature(shape_.id_,point);
|
||||
++count_;
|
||||
}
|
||||
else if (type == shape_io::shape_pointz)
|
||||
else if (type == shape_io::shape_pointm)
|
||||
{
|
||||
double x=shape_.shp().read_double();
|
||||
double y=shape_.shp().read_double();
|
||||
double z=shape_.shp().read_double();
|
||||
shape_.shp().read_double();// m
|
||||
geometry_ptr point(new point_impl(-1));
|
||||
point->move_to(x,y);
|
||||
f=new Feature(shape_.id_,point);
|
||||
++count_;
|
||||
}
|
||||
else if (type == shape_io::shape_pointz)
|
||||
{
|
||||
double x=shape_.shp().read_double();
|
||||
double y=shape_.shp().read_double();
|
||||
shape_.shp().read_double();// z
|
||||
shape_.shp().read_double();// m
|
||||
geometry_ptr point(new point_impl(-1));
|
||||
point->move_to(x,y);
|
||||
f=new Feature(shape_.id_,point);
|
||||
++count_;
|
||||
}
|
||||
else
|
||||
{
|
||||
while(!filter_.pass(shape_.current_extent()) &&
|
||||
|
@ -103,6 +114,20 @@ Feature* shape_index_featureset<filterT>::next()
|
|||
++count_;
|
||||
break;
|
||||
}
|
||||
case shape_io::shape_polylinem:
|
||||
{
|
||||
geometry_ptr line = shape_.read_polylinem();
|
||||
f=new Feature(shape_.id_,line);
|
||||
++count_;
|
||||
break;
|
||||
}
|
||||
case shape_io::shape_polylinez:
|
||||
{
|
||||
geometry_ptr line = shape_.read_polylinez();
|
||||
f=new Feature(shape_.id_,line);
|
||||
++count_;
|
||||
break;
|
||||
}
|
||||
case shape_io::shape_polygon:
|
||||
{
|
||||
|
||||
|
@ -111,11 +136,25 @@ Feature* shape_index_featureset<filterT>::next()
|
|||
++count_;
|
||||
break;
|
||||
}
|
||||
case shape_io::shape_polygonm:
|
||||
{
|
||||
geometry_ptr poly = shape_.read_polygonm();
|
||||
f=new Feature(shape_.id_,poly);
|
||||
++count_;
|
||||
break;
|
||||
}
|
||||
case shape_io::shape_polygonz:
|
||||
{
|
||||
geometry_ptr poly = shape_.read_polygonz();
|
||||
f=new Feature(shape_.id_,poly);
|
||||
++count_;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (attr_ids_.size())
|
||||
{
|
||||
shape_.dbf().move_to(shape_.id_);
|
||||
typename std::vector<int>::const_iterator pos=attr_ids_.begin();
|
||||
std::vector<int>::const_iterator pos=attr_ids_.begin();
|
||||
while (pos!=attr_ids_.end())
|
||||
{
|
||||
try
|
||||
|
@ -124,7 +163,7 @@ Feature* shape_index_featureset<filterT>::next()
|
|||
}
|
||||
catch (...)
|
||||
{
|
||||
//TODO
|
||||
std::cerr<<"exception caught\n";
|
||||
}
|
||||
++pos;
|
||||
}
|
414
datasources/shape/shape_io.cpp
Normal file
414
datasources/shape/shape_io.cpp
Normal file
|
@ -0,0 +1,414 @@
|
|||
/* This file is part of Mapnik (c++ mapping toolkit)
|
||||
* Copyright (C) 2005 Artem Pavlenko
|
||||
*
|
||||
* Mapnik is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
//$Id: shape_io.cc 26 2005-03-29 19:18:59Z pavlenko $
|
||||
|
||||
#include "shape_io.hh"
|
||||
#include "shape.hh"
|
||||
|
||||
|
||||
const std::string shape_io::SHP = ".shp";
|
||||
const std::string shape_io::DBF = ".dbf";
|
||||
|
||||
shape_io::shape_io(const std::string& shape_name)
|
||||
: type_(shape_null),
|
||||
reclength_(0),
|
||||
id_(0)
|
||||
{
|
||||
bool ok = (shp_.open(shape_name + SHP) &&
|
||||
dbf_.open(shape_name + DBF));
|
||||
if (!ok)
|
||||
{
|
||||
throw datasource_exception("cannot read shape file");
|
||||
}
|
||||
}
|
||||
|
||||
shape_io::~shape_io()
|
||||
{
|
||||
shp_.close();
|
||||
dbf_.close();
|
||||
}
|
||||
|
||||
|
||||
void shape_io::move_to (int pos)
|
||||
{
|
||||
shp_.seek(pos);
|
||||
id_ = shp_.read_xdr_integer();
|
||||
reclength_ = shp_.read_xdr_integer();
|
||||
type_ = shp_.read_ndr_integer();
|
||||
|
||||
if (type_ != shape_point)
|
||||
{
|
||||
shp_.read_envelope(cur_extent_);
|
||||
}
|
||||
}
|
||||
|
||||
int shape_io::type() const
|
||||
{
|
||||
return type_;
|
||||
}
|
||||
|
||||
const Envelope<double>& shape_io::current_extent() const
|
||||
{
|
||||
return cur_extent_;
|
||||
}
|
||||
|
||||
shape_file& shape_io::shp()
|
||||
{
|
||||
return shp_;
|
||||
}
|
||||
|
||||
shape_file& shape_io::shx()
|
||||
{
|
||||
return shx_;
|
||||
}
|
||||
|
||||
|
||||
dbf_file& shape_io::dbf()
|
||||
{
|
||||
return dbf_;
|
||||
}
|
||||
|
||||
|
||||
geometry_ptr shape_io::read_polyline()
|
||||
{
|
||||
shape_record record(reclength_*2-36);
|
||||
shp_.read_record(record);
|
||||
int num_parts=record.read_ndr_integer();
|
||||
int num_points=record.read_ndr_integer();
|
||||
geometry_ptr line(new line_string_impl(-1));
|
||||
|
||||
if (num_parts == 1)
|
||||
{
|
||||
record.skip(4);
|
||||
double x=record.read_double();
|
||||
double y=record.read_double();
|
||||
line->move_to(x,y);
|
||||
for (int i=1;i<num_points;++i)
|
||||
{
|
||||
x=record.read_double();
|
||||
y=record.read_double();
|
||||
line->line_to(x,y);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
std::vector<int> parts(num_parts);
|
||||
for (int i=0;i<num_parts;++i)
|
||||
{
|
||||
parts[i]=record.read_ndr_integer();
|
||||
}
|
||||
|
||||
int start,end;
|
||||
for (int k=0;k<num_parts;++k)
|
||||
{
|
||||
start=parts[k];
|
||||
if (k==num_parts-1)
|
||||
end=num_points;
|
||||
else
|
||||
end=parts[k+1];
|
||||
|
||||
double x=record.read_double();
|
||||
double y=record.read_double();
|
||||
line->move_to(x,y);
|
||||
|
||||
for (int j=start+1;j<end;++j)
|
||||
{
|
||||
x=record.read_double();
|
||||
y=record.read_double();
|
||||
line->line_to(x,y);
|
||||
}
|
||||
}
|
||||
}
|
||||
return line;
|
||||
}
|
||||
|
||||
geometry_ptr shape_io::read_polylinem()
|
||||
{
|
||||
shape_record record(reclength_*2-36);
|
||||
shp_.read_record(record);
|
||||
int num_parts=record.read_ndr_integer();
|
||||
int num_points=record.read_ndr_integer();
|
||||
geometry_ptr line(new line_string_impl(-1));
|
||||
|
||||
if (num_parts == 1)
|
||||
{
|
||||
record.skip(4);
|
||||
double x=record.read_double();
|
||||
double y=record.read_double();
|
||||
line->move_to(x,y);
|
||||
for (int i=1;i<num_points;++i)
|
||||
{
|
||||
x=record.read_double();
|
||||
y=record.read_double();
|
||||
line->line_to(x,y);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
std::vector<int> parts(num_parts);
|
||||
for (int i=0;i<num_parts;++i)
|
||||
{
|
||||
parts[i]=record.read_ndr_integer();
|
||||
}
|
||||
|
||||
int start,end;
|
||||
for (int k=0;k<num_parts;++k)
|
||||
{
|
||||
start=parts[k];
|
||||
if (k==num_parts-1)
|
||||
end=num_points;
|
||||
else
|
||||
end=parts[k+1];
|
||||
|
||||
double x=record.read_double();
|
||||
double y=record.read_double();
|
||||
line->move_to(x,y);
|
||||
|
||||
for (int j=start+1;j<end;++j)
|
||||
{
|
||||
x=record.read_double();
|
||||
y=record.read_double();
|
||||
line->line_to(x,y);
|
||||
}
|
||||
}
|
||||
}
|
||||
// m-range
|
||||
//double m0=record.read_double();
|
||||
//double m1=record.read_double();
|
||||
|
||||
//for (int i=0;i<num_points;++i)
|
||||
//{
|
||||
// double m=record.read_double();
|
||||
//}
|
||||
|
||||
return line;
|
||||
}
|
||||
|
||||
geometry_ptr shape_io::read_polylinez()
|
||||
{
|
||||
shape_record record(reclength_*2-36);
|
||||
shp_.read_record(record);
|
||||
int num_parts=record.read_ndr_integer();
|
||||
int num_points=record.read_ndr_integer();
|
||||
geometry_ptr line(new line_string_impl(-1));
|
||||
|
||||
if (num_parts == 1)
|
||||
{
|
||||
record.skip(4);
|
||||
double x=record.read_double();
|
||||
double y=record.read_double();
|
||||
line->move_to(x,y);
|
||||
for (int i=1;i<num_points;++i)
|
||||
{
|
||||
x=record.read_double();
|
||||
y=record.read_double();
|
||||
line->line_to(x,y);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
std::vector<int> parts(num_parts);
|
||||
for (int i=0;i<num_parts;++i)
|
||||
{
|
||||
parts[i]=record.read_ndr_integer();
|
||||
}
|
||||
|
||||
int start,end;
|
||||
for (int k=0;k<num_parts;++k)
|
||||
{
|
||||
start=parts[k];
|
||||
if (k==num_parts-1)
|
||||
end=num_points;
|
||||
else
|
||||
end=parts[k+1];
|
||||
|
||||
double x=record.read_double();
|
||||
double y=record.read_double();
|
||||
line->move_to(x,y);
|
||||
|
||||
for (int j=start+1;j<end;++j)
|
||||
{
|
||||
x=record.read_double();
|
||||
y=record.read_double();
|
||||
line->line_to(x,y);
|
||||
}
|
||||
}
|
||||
}
|
||||
// z-range
|
||||
//double z0=record.read_double();
|
||||
//double z1=record.read_double();
|
||||
//for (int i=0;i<num_points;++i)
|
||||
// {
|
||||
// double z=record.read_double();
|
||||
// }
|
||||
|
||||
// m-range
|
||||
//double m0=record.read_double();
|
||||
//double m1=record.read_double();
|
||||
|
||||
//for (int i=0;i<num_points;++i)
|
||||
//{
|
||||
// double m=record.read_double();
|
||||
//}
|
||||
return line;
|
||||
}
|
||||
|
||||
geometry_ptr shape_io::read_polygon()
|
||||
{
|
||||
shape_record record(reclength_*2-36);
|
||||
shp_.read_record(record);
|
||||
int num_parts=record.read_ndr_integer();
|
||||
int num_points=record.read_ndr_integer();
|
||||
std::vector<int> parts(num_parts);
|
||||
geometry_ptr poly(new polygon_impl(-1));
|
||||
|
||||
for (int i=0;i<num_parts;++i)
|
||||
{
|
||||
parts[i]=record.read_ndr_integer();
|
||||
}
|
||||
|
||||
for (int k=0;k<num_parts;k++)
|
||||
{
|
||||
int start=parts[k];
|
||||
int end;
|
||||
if (k==num_parts-1)
|
||||
{
|
||||
end=num_points;
|
||||
}
|
||||
else
|
||||
{
|
||||
end=parts[k+1];
|
||||
}
|
||||
double x=record.read_double();
|
||||
double y=record.read_double();
|
||||
poly->move_to(x,y);
|
||||
|
||||
for (int j=start+1;j<end;j++)
|
||||
{
|
||||
x=record.read_double();
|
||||
y=record.read_double();
|
||||
poly->line_to(x,y);
|
||||
}
|
||||
}
|
||||
return poly;
|
||||
}
|
||||
|
||||
geometry_ptr shape_io::read_polygonm()
|
||||
{
|
||||
shape_record record(reclength_*2-36);
|
||||
shp_.read_record(record);
|
||||
int num_parts=record.read_ndr_integer();
|
||||
int num_points=record.read_ndr_integer();
|
||||
std::vector<int> parts(num_parts);
|
||||
geometry_ptr poly(new polygon_impl(-1));
|
||||
|
||||
for (int i=0;i<num_parts;++i)
|
||||
{
|
||||
parts[i]=record.read_ndr_integer();
|
||||
}
|
||||
|
||||
for (int k=0;k<num_parts;k++)
|
||||
{
|
||||
int start=parts[k];
|
||||
int end;
|
||||
if (k==num_parts-1)
|
||||
{
|
||||
end=num_points;
|
||||
}
|
||||
else
|
||||
{
|
||||
end=parts[k+1];
|
||||
}
|
||||
double x=record.read_double();
|
||||
double y=record.read_double();
|
||||
poly->move_to(x,y);
|
||||
|
||||
for (int j=start+1;j<end;j++)
|
||||
{
|
||||
x=record.read_double();
|
||||
y=record.read_double();
|
||||
poly->line_to(x,y);
|
||||
}
|
||||
}
|
||||
// m-range
|
||||
//double m0=record.read_double();
|
||||
//double m1=record.read_double();
|
||||
|
||||
//for (int i=0;i<num_points;++i)
|
||||
//{
|
||||
// double m=record.read_double();
|
||||
//}
|
||||
return poly;
|
||||
}
|
||||
|
||||
geometry_ptr shape_io::read_polygonz()
|
||||
{
|
||||
shape_record record(reclength_*2-36);
|
||||
shp_.read_record(record);
|
||||
int num_parts=record.read_ndr_integer();
|
||||
int num_points=record.read_ndr_integer();
|
||||
std::vector<int> parts(num_parts);
|
||||
geometry_ptr poly(new polygon_impl(-1));
|
||||
|
||||
for (int i=0;i<num_parts;++i)
|
||||
{
|
||||
parts[i]=record.read_ndr_integer();
|
||||
}
|
||||
|
||||
for (int k=0;k<num_parts;k++)
|
||||
{
|
||||
int start=parts[k];
|
||||
int end;
|
||||
if (k==num_parts-1)
|
||||
{
|
||||
end=num_points;
|
||||
}
|
||||
else
|
||||
{
|
||||
end=parts[k+1];
|
||||
}
|
||||
double x=record.read_double();
|
||||
double y=record.read_double();
|
||||
poly->move_to(x,y);
|
||||
|
||||
for (int j=start+1;j<end;j++)
|
||||
{
|
||||
x=record.read_double();
|
||||
y=record.read_double();
|
||||
poly->line_to(x,y);
|
||||
}
|
||||
}
|
||||
// z-range
|
||||
//double z0=record.read_double();
|
||||
//double z1=record.read_double();
|
||||
//for (int i=0;i<num_points;++i)
|
||||
//{
|
||||
// double z=record.read_double();
|
||||
//}
|
||||
|
||||
// m-range
|
||||
//double m0=record.read_double();
|
||||
//double m1=record.read_double();
|
||||
|
||||
//for (int i=0;i<num_points;++i)
|
||||
//{
|
||||
// double m=record.read_double();
|
||||
//}
|
||||
return poly;
|
||||
}
|
|
@ -40,7 +40,6 @@ struct shape_io
|
|||
Envelope<double> cur_extent_;
|
||||
|
||||
public:
|
||||
|
||||
enum
|
||||
{
|
||||
shape_null = 0,
|
||||
|
@ -69,8 +68,11 @@ public:
|
|||
const Envelope<double>& current_extent() const;
|
||||
|
||||
geometry_ptr read_polyline();
|
||||
geometry_ptr read_polylinem();
|
||||
geometry_ptr read_polylinez();
|
||||
geometry_ptr read_polygon();
|
||||
//geometry_ptr read_multipolygon(shape_record& record);
|
||||
geometry_ptr read_polygonm();
|
||||
geometry_ptr read_polygonz();
|
||||
private:
|
||||
//void read_record(const shape_record& record);
|
||||
// no copying
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
//$Id$
|
||||
//$Id: shapefile.hh 33 2005-04-04 13:01:03Z pavlenko $
|
||||
|
||||
#ifndef SHAPEFILE_HH
|
||||
#define SHAPEFILE_HH
|
522
depcomp
522
depcomp
|
@ -1,522 +0,0 @@
|
|||
#! /bin/sh
|
||||
# depcomp - compile a program generating dependencies as side-effects
|
||||
|
||||
scriptversion=2004-05-31.23
|
||||
|
||||
# Copyright (C) 1999, 2000, 2003, 2004 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
# 02111-1307, USA.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
|
||||
|
||||
case $1 in
|
||||
'')
|
||||
echo "$0: No command. Try \`$0 --help' for more information." 1>&2
|
||||
exit 1;
|
||||
;;
|
||||
-h | --h*)
|
||||
cat <<\EOF
|
||||
Usage: depcomp [--help] [--version] PROGRAM [ARGS]
|
||||
|
||||
Run PROGRAMS ARGS to compile a file, generating dependencies
|
||||
as side-effects.
|
||||
|
||||
Environment variables:
|
||||
depmode Dependency tracking mode.
|
||||
source Source file read by `PROGRAMS ARGS'.
|
||||
object Object file output by `PROGRAMS ARGS'.
|
||||
DEPDIR directory where to store dependencies.
|
||||
depfile Dependency file to output.
|
||||
tmpdepfile Temporary file to use when outputing dependencies.
|
||||
libtool Whether libtool is used (yes/no).
|
||||
|
||||
Report bugs to <bug-automake@gnu.org>.
|
||||
EOF
|
||||
exit 0
|
||||
;;
|
||||
-v | --v*)
|
||||
echo "depcomp $scriptversion"
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
|
||||
echo "depcomp: Variables source, object and depmode must be set" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
|
||||
depfile=${depfile-`echo "$object" |
|
||||
sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
|
||||
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
|
||||
|
||||
rm -f "$tmpdepfile"
|
||||
|
||||
# Some modes work just like other modes, but use different flags. We
|
||||
# parameterize here, but still list the modes in the big case below,
|
||||
# to make depend.m4 easier to write. Note that we *cannot* use a case
|
||||
# here, because this file can only contain one case statement.
|
||||
if test "$depmode" = hp; then
|
||||
# HP compiler uses -M and no extra arg.
|
||||
gccflag=-M
|
||||
depmode=gcc
|
||||
fi
|
||||
|
||||
if test "$depmode" = dashXmstdout; then
|
||||
# This is just like dashmstdout with a different argument.
|
||||
dashmflag=-xM
|
||||
depmode=dashmstdout
|
||||
fi
|
||||
|
||||
case "$depmode" in
|
||||
gcc3)
|
||||
## gcc 3 implements dependency tracking that does exactly what
|
||||
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
|
||||
## it if -MD -MP comes after the -MF stuff. Hmm.
|
||||
"$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
mv "$tmpdepfile" "$depfile"
|
||||
;;
|
||||
|
||||
gcc)
|
||||
## There are various ways to get dependency output from gcc. Here's
|
||||
## why we pick this rather obscure method:
|
||||
## - Don't want to use -MD because we'd like the dependencies to end
|
||||
## up in a subdir. Having to rename by hand is ugly.
|
||||
## (We might end up doing this anyway to support other compilers.)
|
||||
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
|
||||
## -MM, not -M (despite what the docs say).
|
||||
## - Using -M directly means running the compiler twice (even worse
|
||||
## than renaming).
|
||||
if test -z "$gccflag"; then
|
||||
gccflag=-MD,
|
||||
fi
|
||||
"$@" -Wp,"$gccflag$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
|
||||
## The second -e expression handles DOS-style file names with drive letters.
|
||||
sed -e 's/^[^:]*: / /' \
|
||||
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
|
||||
## This next piece of magic avoids the `deleted header file' problem.
|
||||
## The problem is that when a header file which appears in a .P file
|
||||
## is deleted, the dependency causes make to die (because there is
|
||||
## typically no way to rebuild the header). We avoid this by adding
|
||||
## dummy dependencies for each header file. Too bad gcc doesn't do
|
||||
## this for us directly.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" |
|
||||
## Some versions of gcc put a space before the `:'. On the theory
|
||||
## that the space means something, we add a space to the output as
|
||||
## well.
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
hp)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
sgi)
|
||||
if test "$libtool" = yes; then
|
||||
"$@" "-Wp,-MDupdate,$tmpdepfile"
|
||||
else
|
||||
"$@" -MDupdate "$tmpdepfile"
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
|
||||
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
|
||||
echo "$object : \\" > "$depfile"
|
||||
|
||||
# Clip off the initial element (the dependent). Don't try to be
|
||||
# clever and replace this with sed code, as IRIX sed won't handle
|
||||
# lines with more than a fixed number of characters (4096 in
|
||||
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
|
||||
# the IRIX cc adds comments like `#:fec' to the end of the
|
||||
# dependency line.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
|
||||
tr '
|
||||
' ' ' >> $depfile
|
||||
echo >> $depfile
|
||||
|
||||
# The second pass generates a dummy entry for each header file.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
|
||||
>> $depfile
|
||||
else
|
||||
# The sourcefile does not contain any dependencies, so just
|
||||
# store a dummy comment line, to avoid errors with the Makefile
|
||||
# "include basename.Plo" scheme.
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
aix)
|
||||
# The C for AIX Compiler uses -M and outputs the dependencies
|
||||
# in a .u file. In older versions, this file always lives in the
|
||||
# current directory. Also, the AIX compiler puts `$object:' at the
|
||||
# start of each line; $object doesn't have directory information.
|
||||
# Version 6 uses the directory in both cases.
|
||||
stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'`
|
||||
tmpdepfile="$stripped.u"
|
||||
if test "$libtool" = yes; then
|
||||
"$@" -Wc,-M
|
||||
else
|
||||
"$@" -M
|
||||
fi
|
||||
stat=$?
|
||||
|
||||
if test -f "$tmpdepfile"; then :
|
||||
else
|
||||
stripped=`echo "$stripped" | sed 's,^.*/,,'`
|
||||
tmpdepfile="$stripped.u"
|
||||
fi
|
||||
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
if test -f "$tmpdepfile"; then
|
||||
outname="$stripped.o"
|
||||
# Each line is of the form `foo.o: dependent.h'.
|
||||
# Do two passes, one to just change these to
|
||||
# `$object: dependent.h' and one to simply `dependent.h:'.
|
||||
sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
|
||||
sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
# The sourcefile does not contain any dependencies, so just
|
||||
# store a dummy comment line, to avoid errors with the Makefile
|
||||
# "include basename.Plo" scheme.
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
icc)
|
||||
# Intel's C compiler understands `-MD -MF file'. However on
|
||||
# icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
|
||||
# ICC 7.0 will fill foo.d with something like
|
||||
# foo.o: sub/foo.c
|
||||
# foo.o: sub/foo.h
|
||||
# which is wrong. We want:
|
||||
# sub/foo.o: sub/foo.c
|
||||
# sub/foo.o: sub/foo.h
|
||||
# sub/foo.c:
|
||||
# sub/foo.h:
|
||||
# ICC 7.1 will output
|
||||
# foo.o: sub/foo.c sub/foo.h
|
||||
# and will wrap long lines using \ :
|
||||
# foo.o: sub/foo.c ... \
|
||||
# sub/foo.h ... \
|
||||
# ...
|
||||
|
||||
"$@" -MD -MF "$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
# Each line is of the form `foo.o: dependent.h',
|
||||
# or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
|
||||
# Do two passes, one to just change these to
|
||||
# `$object: dependent.h' and one to simply `dependent.h:'.
|
||||
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
|
||||
# Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
# correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
|
||||
sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
tru64)
|
||||
# The Tru64 compiler uses -MD to generate dependencies as a side
|
||||
# effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
|
||||
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
|
||||
# dependencies in `foo.d' instead, so we check for that too.
|
||||
# Subdirectories are respected.
|
||||
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
|
||||
test "x$dir" = "x$object" && dir=
|
||||
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
|
||||
|
||||
if test "$libtool" = yes; then
|
||||
# Dependencies are output in .lo.d with libtool 1.4.
|
||||
# With libtool 1.5 they are output both in $dir.libs/$base.o.d
|
||||
# and in $dir.libs/$base.o.d and $dir$base.o.d. We process the
|
||||
# latter, because the former will be cleaned when $dir.libs is
|
||||
# erased.
|
||||
tmpdepfile1="$dir.libs/$base.lo.d"
|
||||
tmpdepfile2="$dir$base.o.d"
|
||||
tmpdepfile3="$dir.libs/$base.d"
|
||||
"$@" -Wc,-MD
|
||||
else
|
||||
tmpdepfile1="$dir$base.o.d"
|
||||
tmpdepfile2="$dir$base.d"
|
||||
tmpdepfile3="$dir$base.d"
|
||||
"$@" -MD
|
||||
fi
|
||||
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
if test -f "$tmpdepfile1"; then
|
||||
tmpdepfile="$tmpdepfile1"
|
||||
elif test -f "$tmpdepfile2"; then
|
||||
tmpdepfile="$tmpdepfile2"
|
||||
else
|
||||
tmpdepfile="$tmpdepfile3"
|
||||
fi
|
||||
if test -f "$tmpdepfile"; then
|
||||
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
|
||||
# That's a tab and a space in the [].
|
||||
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
#nosideeffect)
|
||||
# This comment above is used by automake to tell side-effect
|
||||
# dependency tracking mechanisms from slower ones.
|
||||
|
||||
dashmstdout)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout, regardless of -o.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test $1 != '--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
# Remove `-o $object'.
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
test -z "$dashmflag" && dashmflag=-M
|
||||
# Require at least two characters before searching for `:'
|
||||
# in the target name. This is to cope with DOS-style filenames:
|
||||
# a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
|
||||
"$@" $dashmflag |
|
||||
sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
cat < "$tmpdepfile" > "$depfile"
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" | \
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
dashXmstdout)
|
||||
# This case only exists to satisfy depend.m4. It is never actually
|
||||
# run, as this mode is specially recognized in the preamble.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
makedepend)
|
||||
"$@" || exit $?
|
||||
# Remove any Libtool call
|
||||
if test "$libtool" = yes; then
|
||||
while test $1 != '--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
# X makedepend
|
||||
shift
|
||||
cleared=no
|
||||
for arg in "$@"; do
|
||||
case $cleared in
|
||||
no)
|
||||
set ""; shift
|
||||
cleared=yes ;;
|
||||
esac
|
||||
case "$arg" in
|
||||
-D*|-I*)
|
||||
set fnord "$@" "$arg"; shift ;;
|
||||
# Strip any option that makedepend may not understand. Remove
|
||||
# the object too, otherwise makedepend will parse it as a source file.
|
||||
-*|$object)
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"; shift ;;
|
||||
esac
|
||||
done
|
||||
obj_suffix="`echo $object | sed 's/^.*\././'`"
|
||||
touch "$tmpdepfile"
|
||||
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
|
||||
rm -f "$depfile"
|
||||
cat < "$tmpdepfile" > "$depfile"
|
||||
sed '1,2d' "$tmpdepfile" | tr ' ' '
|
||||
' | \
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile" "$tmpdepfile".bak
|
||||
;;
|
||||
|
||||
cpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test $1 != '--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
# Remove `-o $object'.
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
"$@" -E |
|
||||
sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
|
||||
sed '$ s: \\$::' > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
cat < "$tmpdepfile" >> "$depfile"
|
||||
sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvisualcpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout, regardless of -o,
|
||||
# because we must use -o when running libtool.
|
||||
"$@" || exit $?
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case "$arg" in
|
||||
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
|
||||
set fnord "$@"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
"$@" -E |
|
||||
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
|
||||
echo " " >> "$depfile"
|
||||
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
none)
|
||||
exec "$@"
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Unknown depmode $depmode" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-end: "$"
|
||||
# End:
|
|
@ -1 +0,0 @@
|
|||
nobase_include_HEADERS = attribute.hh color.hh config.hh coord.hh coord_array.hh vertex_vector.hh ctrans.hh datasource.hh datasource_cache.hh factory.hh feature.hh query.hh filter.hh filter_visitor.hh envelope.hh gamma.hh geometry.hh geom_util.hh graphics.hh image_data.hh image_reader.hh image_util.hh layer.hh line_aa.hh map.hh mapnik.hh math_expr.hh memory.hh params.hh plugin.hh line_symbolizer.hh polygon_symbolizer.hh image_symbolizer.hh pool.hh ptr.hh raster.hh render.hh scanline_aa.hh scanline.hh style.hh style_cache.hh style_factory.hh symbolizer.hh text.hh utils.hh vertex.hh vertex_transform.hh wkb.hh logical.hh rule.hh comparison.hh fill.hh spatial.hh expression.hh stroke.hh attribute_collector.hh colorcube.hh feature_type_style.hh value.hh filter_parser.hh filter_factory.hh
|
|
@ -16,14 +16,16 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
//$Id$
|
||||
//$Id: attribute.hpp 41 2005-04-13 20:21:56Z pavlenko $
|
||||
|
||||
#ifndef ATTRIBUTE_HH
|
||||
#define ATTRIBUTE_HH
|
||||
#ifndef ATTRIBUTE_HPP
|
||||
#define ATTRIBUTE_HPP
|
||||
|
||||
#include <sstream>
|
||||
#include <typeinfo>
|
||||
#include <sstream>
|
||||
#include <map>
|
||||
#include <boost/any.hpp>
|
||||
|
||||
|
||||
namespace mapnik
|
||||
{
|
||||
|
@ -101,8 +103,9 @@ namespace mapnik
|
|||
return *this;
|
||||
}
|
||||
|
||||
struct attribute_base
|
||||
class attribute_base
|
||||
{
|
||||
public:
|
||||
virtual ~attribute_base() {}
|
||||
virtual attribute_base* clone() const=0;
|
||||
virtual std::string to_string() const=0;
|
||||
|
@ -117,24 +120,24 @@ namespace mapnik
|
|||
attribute_impl(const value_type& value)
|
||||
: value_(value) {}
|
||||
|
||||
std::string to_string() const
|
||||
virtual std::string to_string() const
|
||||
{
|
||||
return ATraits::to_string(value_);
|
||||
}
|
||||
|
||||
attribute_base* clone() const
|
||||
virtual attribute_base* clone() const
|
||||
{
|
||||
return new attribute_impl(value_);
|
||||
}
|
||||
const std::type_info& type() const
|
||||
virtual const std::type_info& type() const
|
||||
{
|
||||
return typeid(value_);
|
||||
}
|
||||
value_type value_;
|
||||
};
|
||||
private:
|
||||
template<typename value_type>
|
||||
friend value_type* attribute_cast(attribute*);
|
||||
public:
|
||||
attribute_base* base_;
|
||||
};
|
||||
|
||||
|
@ -163,7 +166,7 @@ namespace mapnik
|
|||
}
|
||||
|
||||
template <typename T>
|
||||
T* attribute_cast(const attribute* attr)
|
||||
const T* attribute_cast(const attribute* attr)
|
||||
{
|
||||
return attribute_cast<T>(const_cast<attribute*>(attr));
|
||||
}
|
||||
|
@ -171,23 +174,28 @@ namespace mapnik
|
|||
template <typename T>
|
||||
T attribute_cast(const attribute& attr)
|
||||
{
|
||||
const T* result=attribute_cast<T>(&attr);
|
||||
using namespace boost;
|
||||
typedef BOOST_DEDUCED_TYPENAME remove_reference<T>::type nonref;
|
||||
const nonref * result=attribute_cast<nonref>(&attr);
|
||||
if (!result)
|
||||
{
|
||||
throw bad_attribute_cast<T>();
|
||||
}
|
||||
return *result;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
T attribute_cast(attribute& attr)
|
||||
{
|
||||
T* result=attribute_cast<T>(&attr);
|
||||
using namespace boost;
|
||||
typedef BOOST_DEDUCED_TYPENAME remove_reference<T>::type nonref;
|
||||
nonref * result=attribute_cast<nonref>(&attr);
|
||||
if (!result)
|
||||
throw bad_attribute_cast<T>();
|
||||
return *result;
|
||||
}
|
||||
|
||||
typedef std::map<std::string,attribute> attributes;
|
||||
|
||||
|
||||
template <typename T>
|
||||
attribute attribute_from_string(const std::string& val)
|
||||
{
|
||||
|
@ -207,4 +215,4 @@ namespace mapnik
|
|||
}
|
||||
}
|
||||
|
||||
#endif //ATTRIBUTE_HH
|
||||
#endif //ATTRIBUTE_HPP
|
|
@ -21,8 +21,10 @@
|
|||
#ifndef ATTRIBUTE_COLLECTOR
|
||||
#define ATTROBUTE_COLLECTOR
|
||||
|
||||
#include "filter.hh"
|
||||
#include "expression.hh"
|
||||
#include "filter.hpp"
|
||||
#include "expression.hpp"
|
||||
#include "feature_layer_desc.hpp"
|
||||
|
||||
#include <set>
|
||||
|
||||
namespace mapnik
|
||||
|
@ -30,14 +32,15 @@ namespace mapnik
|
|||
template <typename FeatureT>
|
||||
class attribute_collector : public filter_visitor<FeatureT>
|
||||
{
|
||||
private:
|
||||
std::set<std::string> names_;
|
||||
public:
|
||||
attribute_collector() {}
|
||||
attribute_collector(std::set<std::string>& names)
|
||||
: names_(names) {}
|
||||
|
||||
void visit(filter<FeatureT>& /*filter*/)
|
||||
{
|
||||
//not interested
|
||||
}
|
||||
|
||||
void visit(expression<FeatureT>& exp)
|
||||
{
|
||||
property<FeatureT>* pf;
|
||||
|
@ -45,17 +48,15 @@ namespace mapnik
|
|||
{
|
||||
names_.insert(pf->name());
|
||||
}
|
||||
}
|
||||
std::set<std::string> const& property_names() const
|
||||
{
|
||||
return names_;
|
||||
}
|
||||
|
||||
}
|
||||
virtual ~attribute_collector() {}
|
||||
private:
|
||||
// no copying
|
||||
attribute_collector(attribute_collector const&);
|
||||
attribute_collector& operator=(attribute_collector const&);
|
||||
private:
|
||||
std::set<std::string>& names_;
|
||||
};
|
||||
}
|
||||
|
||||
#endif //ATTRIBUTE_COLLECTOR_HH
|
||||
#endif //ATTRIBUTE_COLLECTOR_HPP
|
|
@ -16,10 +16,10 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
//$Id$
|
||||
//$Id: color.hpp 39 2005-04-10 20:39:53Z pavlenko $
|
||||
|
||||
#ifndef COLOR_HH
|
||||
#define COLOR_HH
|
||||
#ifndef COLOR_HPP
|
||||
#define COLOR_HPP
|
||||
|
||||
namespace mapnik {
|
||||
|
||||
|
@ -72,4 +72,4 @@ namespace mapnik {
|
|||
};
|
||||
}
|
||||
|
||||
#endif //COLOR_HH
|
||||
#endif //COLOR_HPP
|
|
@ -18,11 +18,11 @@
|
|||
|
||||
//$Id$
|
||||
|
||||
#include "mapnik.hh"
|
||||
#include "mapnik.hpp"
|
||||
#include <iostream>
|
||||
|
||||
#ifndef COLORCUBE_HH
|
||||
#define COLORCUBE_HH
|
||||
#ifndef COLORCUBE_HPP
|
||||
#define COLORCUBE_HPP
|
||||
|
||||
|
||||
namespace mapnik
|
|
@ -18,13 +18,15 @@
|
|||
|
||||
//$Id$
|
||||
|
||||
#ifndef COMPARISON_HH
|
||||
#define COMPARISON_HH
|
||||
#ifndef COMPARISON_HPP
|
||||
#define COMPARISON_HPP
|
||||
|
||||
|
||||
#include "filter.hh"
|
||||
#include "expression.hh"
|
||||
#include "attribute.hh"
|
||||
#include "filter.hpp"
|
||||
#include "expression.hpp"
|
||||
#include "attribute.hpp"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
namespace mapnik
|
||||
{
|
||||
|
@ -35,6 +37,10 @@ namespace mapnik
|
|||
{
|
||||
return left > right;
|
||||
}
|
||||
static std::string to_string()
|
||||
{
|
||||
return ">";
|
||||
}
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
|
@ -44,6 +50,10 @@ namespace mapnik
|
|||
{
|
||||
return left >= right;
|
||||
}
|
||||
static std::string to_string()
|
||||
{
|
||||
return ">=";
|
||||
}
|
||||
};
|
||||
template <typename T>
|
||||
struct less_than
|
||||
|
@ -52,6 +62,10 @@ namespace mapnik
|
|||
{
|
||||
return left < right;
|
||||
}
|
||||
static std::string to_string()
|
||||
{
|
||||
return "<";
|
||||
}
|
||||
};
|
||||
template <typename T>
|
||||
struct less_than_or_equal
|
||||
|
@ -60,6 +74,10 @@ namespace mapnik
|
|||
{
|
||||
return left <= right;
|
||||
}
|
||||
static std::string to_string()
|
||||
{
|
||||
return "<=";
|
||||
}
|
||||
};
|
||||
template <typename T>
|
||||
struct equals
|
||||
|
@ -68,6 +86,10 @@ namespace mapnik
|
|||
{
|
||||
return left == right;
|
||||
}
|
||||
static std::string to_string()
|
||||
{
|
||||
return "=";
|
||||
}
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
|
@ -77,6 +99,10 @@ namespace mapnik
|
|||
{
|
||||
return left != right;
|
||||
}
|
||||
static std::string to_string()
|
||||
{
|
||||
return "<>";
|
||||
}
|
||||
};
|
||||
|
||||
template <typename FeatureT,typename Op>
|
||||
|
@ -92,7 +118,7 @@ namespace mapnik
|
|||
left_(other.left_->clone()),right_(other.right_->clone()) {}
|
||||
|
||||
bool pass(const FeatureT& feature) const
|
||||
{
|
||||
{
|
||||
return Op()(left_->get_value(feature),right_->get_value(feature));
|
||||
}
|
||||
void accept(filter_visitor<FeatureT>& v)
|
||||
|
@ -101,6 +127,11 @@ namespace mapnik
|
|||
right_->accept(v);
|
||||
v.visit(*this);
|
||||
}
|
||||
std::string to_string() const
|
||||
{
|
||||
return "("+left_->to_string()+Op::to_string()+right_->to_string()+")";
|
||||
}
|
||||
|
||||
filter<FeatureT>* clone() const
|
||||
{
|
||||
return new compare_filter<FeatureT,Op>(*this);
|
||||
|
@ -116,4 +147,4 @@ namespace mapnik
|
|||
};
|
||||
}
|
||||
|
||||
#endif //COMPARISON_HH
|
||||
#endif //COMPARISON_HPP
|
|
@ -1,139 +0,0 @@
|
|||
/* include/config.hh.in. Generated from configure.ac by autoheader. */
|
||||
|
||||
/* Define to 1 if the `closedir' function returns void instead of `int'. */
|
||||
#undef CLOSEDIR_VOID
|
||||
|
||||
/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
|
||||
*/
|
||||
#undef HAVE_DIRENT_H
|
||||
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
#undef HAVE_DLFCN_H
|
||||
|
||||
/* Define to 1 if you have the `floor' function. */
|
||||
#undef HAVE_FLOOR
|
||||
|
||||
/* Define to 1 if you have the `gettimeofday' function. */
|
||||
#undef HAVE_GETTIMEOFDAY
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H
|
||||
|
||||
/* Define to 1 if you have the `jpeg' library (-ljpeg). */
|
||||
#undef HAVE_LIBJPEG
|
||||
|
||||
/* Define to 1 if you have the `m' library (-lm). */
|
||||
#undef HAVE_LIBM
|
||||
|
||||
/* Define to 1 if you have the `png' library (-lpng). */
|
||||
#undef HAVE_LIBPNG
|
||||
|
||||
/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
|
||||
to 0 otherwise. */
|
||||
#undef HAVE_MALLOC
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#undef HAVE_MEMORY_H
|
||||
|
||||
/* Define to 1 if you have the `memset' function. */
|
||||
#undef HAVE_MEMSET
|
||||
|
||||
/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
|
||||
#undef HAVE_NDIR_H
|
||||
|
||||
/* Define to 1 if you have the `pow' function. */
|
||||
#undef HAVE_POW
|
||||
|
||||
/* Define to 1 if you have the `sqrt' function. */
|
||||
#undef HAVE_SQRT
|
||||
|
||||
/* Define to 1 if stdbool.h conforms to C99. */
|
||||
#undef HAVE_STDBOOL_H
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#undef HAVE_STDINT_H
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#undef HAVE_STDLIB_H
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#undef HAVE_STRINGS_H
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#undef HAVE_STRING_H
|
||||
|
||||
/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
|
||||
*/
|
||||
#undef HAVE_SYS_DIR_H
|
||||
|
||||
/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
|
||||
*/
|
||||
#undef HAVE_SYS_NDIR_H
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#undef HAVE_SYS_STAT_H
|
||||
|
||||
/* Define to 1 if you have the <sys/time.h> header file. */
|
||||
#undef HAVE_SYS_TIME_H
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#undef HAVE_SYS_TYPES_H
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H
|
||||
|
||||
/* Define to 1 if the system has the type `_Bool'. */
|
||||
#undef HAVE__BOOL
|
||||
|
||||
/* Name of package */
|
||||
#undef PACKAGE
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#undef PACKAGE_BUGREPORT
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#undef PACKAGE_NAME
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#undef PACKAGE_STRING
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#undef PACKAGE_TARNAME
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#undef PACKAGE_VERSION
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#undef STDC_HEADERS
|
||||
|
||||
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
|
||||
#undef TIME_WITH_SYS_TIME
|
||||
|
||||
/* Version number of package */
|
||||
#undef VERSION
|
||||
|
||||
/* Define to 1 if your processor stores words with the most significant byte
|
||||
first (like Motorola and SPARC, unlike Intel and VAX). */
|
||||
#undef WORDS_BIGENDIAN
|
||||
|
||||
/* datasource plugins dir */
|
||||
#undef _DATASOURCE_PLUGINS_DIR
|
||||
|
||||
/* Define to empty if `const' does not conform to ANSI C. */
|
||||
#undef const
|
||||
|
||||
/* Define to `__inline__' or `__inline' if that's what the C compiler
|
||||
calls it, or to nothing if 'inline' is not supported under any name. */
|
||||
#ifndef __cplusplus
|
||||
#undef inline
|
||||
#endif
|
||||
|
||||
/* Define to rpl_malloc if the replacement function should be used. */
|
||||
#undef malloc
|
||||
|
||||
/* Define to `unsigned' if <sys/types.h> does not define. */
|
||||
#undef size_t
|
||||
|
||||
/* Define to empty if the keyword `volatile' does not work. Warning: valid
|
||||
code using `volatile' can become incorrect without. Disable with care. */
|
||||
#undef volatile
|
|
@ -9,17 +9,17 @@
|
|||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.#include "memory.hh"
|
||||
* GNU General Public License for more details.#include "memory.hpp"
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
//$Id$
|
||||
//$Id: coord.hpp 39 2005-04-10 20:39:53Z pavlenko $
|
||||
|
||||
#ifndef COORD_HH
|
||||
#define COORD_HH
|
||||
#ifndef COORD_HPP
|
||||
#define COORD_HPP
|
||||
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
|
@ -128,4 +128,4 @@ namespace mapnik
|
|||
}
|
||||
}
|
||||
|
||||
#endif // COORD_HH
|
||||
#endif // COORD_HPP
|
|
@ -9,19 +9,19 @@
|
|||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.#include "memory.hh"
|
||||
* GNU General Public License for more details.#include "memory.hpp"
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
//$Id$
|
||||
//$Id: coord_array.hpp 39 2005-04-10 20:39:53Z pavlenko $
|
||||
|
||||
#ifndef COORD_ARRAY_HH
|
||||
#define COORD_ARRAY_HH
|
||||
#ifndef COORD_ARRAY_HPP
|
||||
#define COORD_ARRAY_HPP
|
||||
|
||||
#include "coord.hh"
|
||||
#include "coord.hpp"
|
||||
#include <cassert>
|
||||
|
||||
namespace mapnik
|
||||
|
@ -85,4 +85,4 @@ namespace mapnik
|
|||
}
|
||||
|
||||
|
||||
#endif //COORD_ARRAY_HH
|
||||
#endif //COORD_ARRAY_HPP
|
|
@ -16,13 +16,13 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
//$Id$
|
||||
//$Id: ctrans.hpp 39 2005-04-10 20:39:53Z pavlenko $
|
||||
|
||||
#ifndef CTRANS_HH
|
||||
#define CTRANS_HH
|
||||
#ifndef CTRANS_HPP
|
||||
#define CTRANS_HPP
|
||||
|
||||
#include "envelope.hh"
|
||||
#include "coord_array.hh"
|
||||
#include "envelope.hpp"
|
||||
#include "coord_array.hpp"
|
||||
|
||||
namespace mapnik
|
||||
{
|
||||
|
@ -119,4 +119,4 @@ namespace mapnik
|
|||
}
|
||||
};
|
||||
}
|
||||
#endif //CTRANS_HH
|
||||
#endif //CTRANS_HPP
|
|
@ -16,18 +16,19 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
//$Id$
|
||||
//$Id: datasource.hpp 43 2005-04-22 18:52:47Z pavlenko $
|
||||
|
||||
#ifndef DATASOURCE_HH
|
||||
#define DATASOURCE_HH
|
||||
#ifndef DATASOURCE_HPP
|
||||
#define DATASOURCE_HPP
|
||||
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include "ptr.hh"
|
||||
#include "ctrans.hh"
|
||||
#include "params.hh"
|
||||
#include "feature.hh"
|
||||
#include "query.hh"
|
||||
#include "ptr.hpp"
|
||||
#include "ctrans.hpp"
|
||||
#include "params.hpp"
|
||||
#include "feature.hpp"
|
||||
#include "query.hpp"
|
||||
#include "feature_layer_desc.hpp"
|
||||
|
||||
namespace mapnik
|
||||
{
|
||||
|
@ -63,7 +64,8 @@ namespace mapnik
|
|||
};
|
||||
virtual int type() const=0;
|
||||
virtual featureset_ptr features(const query& q) const=0;
|
||||
virtual const Envelope<double>& envelope() const=0;
|
||||
virtual Envelope<double> const& envelope() const=0;
|
||||
virtual layer_descriptor const& get_descriptor() const=0;
|
||||
virtual ~datasource() {};
|
||||
};
|
||||
|
||||
|
@ -98,4 +100,4 @@ namespace mapnik
|
|||
}\
|
||||
///////////////////////////////////////////
|
||||
}
|
||||
#endif //DATASOURCE_HH
|
||||
#endif //DATASOURCE_HPP
|
|
@ -16,16 +16,16 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
//$Id$
|
||||
//$Id: datasource_cache.hpp 39 2005-04-10 20:39:53Z pavlenko $
|
||||
|
||||
#ifndef DSFACTORY_HH
|
||||
#define DSFACTORY_HH
|
||||
#ifndef DSFACTORY_HPP
|
||||
#define DSFACTORY_HPP
|
||||
|
||||
#include "utils.hh"
|
||||
#include "ptr.hh"
|
||||
#include "params.hh"
|
||||
#include "plugin.hh"
|
||||
#include "datasource.hh"
|
||||
#include "utils.hpp"
|
||||
#include "ptr.hpp"
|
||||
#include "params.hpp"
|
||||
#include "plugin.hpp"
|
||||
#include "datasource.hpp"
|
||||
#include <map>
|
||||
|
||||
namespace mapnik
|
||||
|
@ -39,10 +39,11 @@ namespace mapnik
|
|||
datasource_cache(const datasource_cache&);
|
||||
datasource_cache& operator=(const datasource_cache&);
|
||||
static std::map<std::string,ref_ptr<PluginInfo> > plugins_;
|
||||
static void insert(const std::string& name,const lt_dlhandle module);
|
||||
static bool registered_;
|
||||
static bool insert(const std::string& name,const lt_dlhandle module);
|
||||
public:
|
||||
static void register_datasources(const std::string& path);
|
||||
static ref_ptr<datasource,datasource_delete> create(const Parameters& params);
|
||||
};
|
||||
}
|
||||
#endif //DSFACTORY_HH
|
||||
#endif //DSFACTORY_HPP
|
|
@ -16,12 +16,12 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
//$Id$
|
||||
//$Id: envelope.hpp 39 2005-04-10 20:39:53Z pavlenko $
|
||||
|
||||
#ifndef ENVELOPE_HH
|
||||
#define ENVELOPE_HH
|
||||
#ifndef ENVELOPE_HPP
|
||||
#define ENVELOPE_HPP
|
||||
|
||||
#include "coord.hh"
|
||||
#include "coord.hpp"
|
||||
|
||||
namespace mapnik
|
||||
{
|
||||
|
@ -77,4 +77,4 @@ namespace mapnik
|
|||
return out;
|
||||
}
|
||||
}
|
||||
#endif // ENVELOPE_HH
|
||||
#endif // ENVELOPE_HPP
|
|
@ -18,11 +18,11 @@
|
|||
|
||||
//$Id$
|
||||
|
||||
#ifndef EXPRESSION_HH
|
||||
#define EXPRESSION_HH
|
||||
#ifndef EXPRESSION_HPP
|
||||
#define EXPRESSION_HPP
|
||||
|
||||
#include "value.hh"
|
||||
#include "filter_visitor.hh"
|
||||
#include "value.hpp"
|
||||
#include "filter_visitor.hpp"
|
||||
|
||||
namespace mapnik
|
||||
{
|
||||
|
@ -33,6 +33,7 @@ namespace mapnik
|
|||
virtual value get_value(FeatureT const& feature) const=0;
|
||||
virtual void accept(filter_visitor<FeatureT>& v)=0;
|
||||
virtual expression<FeatureT>* clone() const=0;
|
||||
virtual std::string to_string() const=0;
|
||||
virtual ~expression() {}
|
||||
};
|
||||
|
||||
|
@ -65,7 +66,10 @@ namespace mapnik
|
|||
{
|
||||
return new literal(*this);
|
||||
}
|
||||
|
||||
std::string to_string() const
|
||||
{
|
||||
return "'"+value_.to_string()+"'";
|
||||
}
|
||||
~literal() {}
|
||||
private:
|
||||
value value_;
|
||||
|
@ -79,16 +83,26 @@ namespace mapnik
|
|||
public:
|
||||
property(std::string const& name)
|
||||
: expression<FeatureT>(),
|
||||
name_(name) {}
|
||||
name_(name),
|
||||
index_(0),
|
||||
valid_(false) {}
|
||||
|
||||
property(property const& other)
|
||||
: expression<FeatureT>(),
|
||||
name_(other.name_) {}
|
||||
name_(other.name_),
|
||||
index_(other.index_),
|
||||
valid_(other.valid_) {}
|
||||
|
||||
value get_value(FeatureT const& feature) const
|
||||
{
|
||||
const attribute& attr=feature.attribute_by_name(name_);
|
||||
return value(attr);
|
||||
if (valid_)
|
||||
{
|
||||
return feature.get_property(index_);
|
||||
}
|
||||
else
|
||||
{
|
||||
return value("");
|
||||
}
|
||||
}
|
||||
void accept(filter_visitor<FeatureT>& v)
|
||||
{
|
||||
|
@ -102,11 +116,21 @@ namespace mapnik
|
|||
{
|
||||
return name_;
|
||||
}
|
||||
void set_index(size_t index)
|
||||
{
|
||||
index_=index;
|
||||
valid_=true;
|
||||
}
|
||||
std::string to_string() const
|
||||
{
|
||||
return "["+name_+"]";
|
||||
}
|
||||
~property() {}
|
||||
private:
|
||||
std::string name_;
|
||||
size_t index_;
|
||||
bool valid_;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif //EXPRESSION_HH
|
||||
#endif //EXPRESSION_HPP
|
|
@ -16,14 +16,14 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
//$Id$
|
||||
//$Id: factory.hpp 39 2005-04-10 20:39:53Z pavlenko $
|
||||
|
||||
#ifndef FACTORY_HH
|
||||
#define FACTORY_HH
|
||||
#ifndef FACTORY_HPP
|
||||
#define FACTORY_HPP
|
||||
|
||||
#include <stdexcept>
|
||||
#include <map>
|
||||
#include "utils.hh"
|
||||
#include "utils.hpp"
|
||||
|
||||
namespace mapnik
|
||||
{
|
||||
|
@ -81,4 +81,4 @@ namespace mapnik
|
|||
}
|
||||
};
|
||||
}
|
||||
#endif //FACTORY_HH
|
||||
#endif //FACTORY_HPP
|
|
@ -16,19 +16,21 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
//$Id$
|
||||
//$Id: feature.hpp 40 2005-04-13 20:20:46Z pavlenko $
|
||||
|
||||
#ifndef FEATURE_HH
|
||||
#define FEATURE_HH
|
||||
#ifndef FEATURE_HPP
|
||||
#define FEATURE_HPP
|
||||
|
||||
#include "geometry.hh"
|
||||
#include "raster.hh"
|
||||
#include "attribute.hh"
|
||||
#include "geometry.hpp"
|
||||
#include "raster.hpp"
|
||||
#include "value.hpp"
|
||||
#include <vector>
|
||||
|
||||
namespace mapnik
|
||||
{
|
||||
typedef ref_ptr<raster> raster_ptr;
|
||||
|
||||
typedef ref_ptr<raster> raster_ptr;
|
||||
typedef std::vector<value> properties;
|
||||
|
||||
template <typename T1,typename T2>
|
||||
struct feature
|
||||
{
|
||||
|
@ -39,9 +41,8 @@ namespace mapnik
|
|||
int id_;
|
||||
geometry_type geom_;
|
||||
raster_type raster_;
|
||||
attributes attr_;
|
||||
properties props_;
|
||||
public:
|
||||
|
||||
explicit feature(int id)
|
||||
: id_(id),
|
||||
geom_(),
|
||||
|
@ -86,24 +87,30 @@ namespace mapnik
|
|||
return raster_;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void add_attribute(const std::string& name,const T& value)
|
||||
void add_property(int v)
|
||||
{
|
||||
attr_.insert(std::make_pair(name,attribute(value)));
|
||||
return props_.push_back(value(v));
|
||||
}
|
||||
|
||||
const attribute& attribute_by_name(const std::string& name) const
|
||||
void add_property(double v)
|
||||
{
|
||||
typename attributes::const_iterator pos=attr_.find(name);
|
||||
if (pos!=attr_.end())
|
||||
return pos->second;
|
||||
static attribute empty(0);
|
||||
return empty;
|
||||
return props_.push_back(value(v));
|
||||
}
|
||||
|
||||
const attributes& get_attributes() const
|
||||
void add_property(std::string const& v)
|
||||
{
|
||||
return attr_;
|
||||
return props_.push_back(value(v));
|
||||
}
|
||||
|
||||
value get_property(size_t index) const
|
||||
{
|
||||
assert(index < props_.size());
|
||||
return props_[index];
|
||||
}
|
||||
|
||||
const properties& get_properties() const
|
||||
{
|
||||
return props_;
|
||||
}
|
||||
|
||||
private:
|
||||
|
@ -112,11 +119,11 @@ namespace mapnik
|
|||
std::swap(id_,rhs.id_);
|
||||
std::swap(geom_,rhs.geom_);
|
||||
std::swap(raster_,rhs.raster_);
|
||||
std::swap(attr_,rhs.attr_);
|
||||
std::swap(props_,rhs.props_);
|
||||
}
|
||||
};
|
||||
|
||||
typedef feature<geometry_ptr,raster_ptr> Feature;
|
||||
|
||||
}
|
||||
#endif //FEATURE_HH
|
||||
#endif //FEATURE_HPP
|
249
include/feature_layer_desc.hpp
Normal file
249
include/feature_layer_desc.hpp
Normal file
|
@ -0,0 +1,249 @@
|
|||
/* This file is part of Mapnik (c++ mapping toolkit)
|
||||
* Copyright (C) 2005 Artem Pavlenko
|
||||
*
|
||||
* Mapnik is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.#include "memory.hh"
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
//$Id$
|
||||
|
||||
#ifndef FEATURE_LAYER_DESC_HPP
|
||||
#define FEATURE_LAYER_DESC_HPP
|
||||
|
||||
//#include "array.hpp"
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <iostream>
|
||||
|
||||
namespace mapnik
|
||||
{
|
||||
|
||||
using std::string;
|
||||
using std::vector;
|
||||
using std::cout;
|
||||
using std::cerr;
|
||||
using std::endl;
|
||||
|
||||
enum {
|
||||
Integer=1,
|
||||
Float =2,
|
||||
Double =3,
|
||||
String =4,
|
||||
Geometry=5,
|
||||
Object=6
|
||||
};
|
||||
|
||||
class attribute_descriptor
|
||||
{
|
||||
public:
|
||||
attribute_descriptor(string const& name,unsigned type,
|
||||
bool primary_key=false,
|
||||
int size=-1,
|
||||
int precision=-1)
|
||||
: name_(name),
|
||||
type_(type),
|
||||
primary_key_(primary_key),
|
||||
size_(size),
|
||||
precision_(precision) {}
|
||||
|
||||
attribute_descriptor(attribute_descriptor const& other)
|
||||
: name_(other.name_),
|
||||
type_(other.type_),
|
||||
primary_key_(other.primary_key_),
|
||||
size_(other.size_),
|
||||
precision_(other.precision_) {}
|
||||
|
||||
attribute_descriptor& operator=(attribute_descriptor const& other)
|
||||
{
|
||||
if (this == &other)
|
||||
return *this;
|
||||
name_=other.name_;
|
||||
type_=other.type_;
|
||||
primary_key_=other.primary_key_;
|
||||
size_=other.size_;
|
||||
precision_=other.precision_;
|
||||
return *this;
|
||||
}
|
||||
string const& get_name() const
|
||||
{
|
||||
return name_;
|
||||
}
|
||||
unsigned get_type() const
|
||||
{
|
||||
return type_;
|
||||
}
|
||||
bool is_primary_key() const
|
||||
{
|
||||
return primary_key_;
|
||||
}
|
||||
int get_size() const
|
||||
{
|
||||
return size_;
|
||||
}
|
||||
|
||||
int get_precision() const
|
||||
{
|
||||
return precision_;
|
||||
}
|
||||
private:
|
||||
string name_;
|
||||
int type_;
|
||||
bool primary_key_;
|
||||
int size_;
|
||||
int precision_;
|
||||
};
|
||||
|
||||
template <typename charT,typename traits>
|
||||
inline std::basic_ostream<charT,traits>&
|
||||
operator << (std::basic_ostream<charT,traits>& out,
|
||||
attribute_descriptor const& ad)
|
||||
{
|
||||
out << "name=" << ad.get_name() << endl;
|
||||
out << "type=" << ad.get_type() << endl;
|
||||
out << "size=" << ad.get_size() << endl;
|
||||
return out;
|
||||
}
|
||||
|
||||
class layer_descriptor
|
||||
{
|
||||
public:
|
||||
layer_descriptor(string const& name,int srid=-1)
|
||||
: name_(name),
|
||||
srid_(srid) {}
|
||||
|
||||
layer_descriptor(layer_descriptor const& other)
|
||||
: name_(other.name_),
|
||||
srid_(other.srid_),
|
||||
desc_ar_(other.desc_ar_) {}
|
||||
|
||||
void set_name(string const& name)
|
||||
{
|
||||
name_=name;
|
||||
}
|
||||
string const& get_name() const
|
||||
{
|
||||
return name_;
|
||||
}
|
||||
|
||||
void set_srid(int srid)
|
||||
{
|
||||
srid_=srid;
|
||||
}
|
||||
|
||||
int get_srid() const
|
||||
{
|
||||
return srid_;
|
||||
}
|
||||
|
||||
void add_descriptor(attribute_descriptor const& desc)
|
||||
{
|
||||
desc_ar_.push_back(desc);
|
||||
}
|
||||
|
||||
vector<attribute_descriptor> const& get_descriptors() const
|
||||
{
|
||||
return desc_ar_;
|
||||
}
|
||||
vector<attribute_descriptor>& get_descriptors()
|
||||
{
|
||||
return desc_ar_;
|
||||
}
|
||||
private:
|
||||
string name_;
|
||||
int srid_;
|
||||
vector<attribute_descriptor> desc_ar_;
|
||||
};
|
||||
|
||||
template <typename charT,typename traits>
|
||||
inline std::basic_ostream<charT,traits>&
|
||||
operator << (std::basic_ostream<charT,traits>& out,
|
||||
layer_descriptor const& ld)
|
||||
{
|
||||
out << "name=" << ld.get_name() << endl;
|
||||
out << "srid=" << ld.get_srid() << endl;
|
||||
vector<attribute_descriptor> const& desc_ar=ld.get_descriptors();
|
||||
vector<attribute_descriptor>::const_iterator pos=desc_ar.begin();
|
||||
while (pos != desc_ar.end())
|
||||
{
|
||||
out << *pos++ << endl;
|
||||
|
||||
}
|
||||
return out;
|
||||
}
|
||||
/*
|
||||
bool layer_descriptor_to_wkb(layer_descriptor const& desc,array<>& wkb)
|
||||
{
|
||||
//srid
|
||||
int srid = desc.get_srid();
|
||||
wkb.write(&srid,sizeof(int));
|
||||
|
||||
//attribute descriptors
|
||||
vector<attribute_descriptor> const& desc_ar = desc.get_descriptors();
|
||||
vector<attribute_descriptor>::const_iterator itr=desc_ar.begin();
|
||||
size_t num_desc = desc_ar.size();
|
||||
wkb.write(&num_desc,sizeof(int));
|
||||
|
||||
while (itr != desc_ar.end())
|
||||
{
|
||||
string name = itr->get_name();
|
||||
wkb.write(name.c_str(),name.size()+1);
|
||||
|
||||
unsigned type = static_cast<int>(itr->get_type());
|
||||
wkb.write(&type,sizeof(unsigned));
|
||||
|
||||
bool prim_key = itr->is_primary_key();
|
||||
wkb.write(&prim_key,sizeof(bool));
|
||||
|
||||
int size = itr->get_size();
|
||||
wkb.write(&size,sizeof(int));
|
||||
|
||||
++itr;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool layer_descriptor_from_wkb(const char* wkb, layer_descriptor &desc)
|
||||
{
|
||||
unsigned pos=0;
|
||||
int srid;
|
||||
|
||||
memcpy(&srid,wkb+pos,sizeof(int));
|
||||
desc.set_srid(srid);
|
||||
pos+=sizeof(int);
|
||||
|
||||
int num_desc;
|
||||
memcpy(&num_desc,wkb+pos,sizeof(int));
|
||||
pos+=sizeof(int);
|
||||
|
||||
for (int i=0;i<num_desc;++i)
|
||||
{
|
||||
string name = wkb+pos;
|
||||
pos += name.size()+1;
|
||||
//std::cout<<"name="<<name<<"\n";
|
||||
|
||||
int type;
|
||||
memcpy(&type,wkb+pos,sizeof(int));
|
||||
pos += sizeof(int);
|
||||
attribute_descriptor ad(name,type);
|
||||
desc.add_descriptor(ad);
|
||||
//todo!!!
|
||||
pos += 4+1;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
#endif //FEATURE_LAYER_DESC_HPP
|
|
@ -21,15 +21,13 @@
|
|||
#ifndef FEATURE_TYPE_STYLE
|
||||
#define FEATURE_TYPE_STYLE
|
||||
|
||||
#include "rule.hh"
|
||||
#include "feature.hh"
|
||||
#include "ptr.hh"
|
||||
#include "rule.hpp"
|
||||
#include "feature.hpp"
|
||||
#include "ptr.hpp"
|
||||
#include <vector>
|
||||
|
||||
namespace mapnik
|
||||
{
|
||||
|
||||
//typedef feature<geometry_ptr,raster_ptr> Feature;
|
||||
typedef rule<Feature,filter> rule_type;
|
||||
|
||||
class feature_type_style
|
|
@ -18,8 +18,8 @@
|
|||
|
||||
//$Id$
|
||||
|
||||
#ifndef FILL_HH
|
||||
#define FILL_HH
|
||||
#ifndef FILL_HPP
|
||||
#define FILL_HPP
|
||||
|
||||
namespace mapnik
|
||||
{
|
||||
|
@ -29,4 +29,4 @@ namespace mapnik
|
|||
};
|
||||
}
|
||||
|
||||
#endif //FILL_HH
|
||||
#endif //FILL_HPP
|
|
@ -18,11 +18,11 @@
|
|||
|
||||
//$Id$
|
||||
|
||||
#ifndef FILTER_HH
|
||||
#define FILTER_HH
|
||||
#ifndef FILTER_HPP
|
||||
#define FILTER_HPP
|
||||
|
||||
#include "filter_visitor.hh"
|
||||
#include "feature.hh"
|
||||
#include "filter_visitor.hpp"
|
||||
#include "feature.hpp"
|
||||
namespace mapnik
|
||||
{
|
||||
typedef ref_ptr<filter<Feature> > filter_ptr;
|
||||
|
@ -34,6 +34,7 @@ namespace mapnik
|
|||
virtual bool pass(const FeatureT& feature) const=0;
|
||||
virtual filter<FeatureT>* clone() const=0;
|
||||
virtual void accept(filter_visitor<FeatureT>& v) = 0;
|
||||
virtual std::string to_string() const=0;
|
||||
virtual ~filter() {}
|
||||
};
|
||||
|
||||
|
@ -51,12 +52,14 @@ namespace mapnik
|
|||
{
|
||||
return new null_filter<FeatureT>;
|
||||
}
|
||||
void accept(filter_visitor<FeatureT>&)
|
||||
{}
|
||||
std::string to_string() const
|
||||
{
|
||||
return "true";
|
||||
}
|
||||
void accept(filter_visitor<FeatureT>&) {}
|
||||
virtual ~null_filter() {}
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
||||
#endif //FILTER_HH
|
||||
#endif //FILTER_HPP
|
61
include/filter_expression.hpp
Normal file
61
include/filter_expression.hpp
Normal file
|
@ -0,0 +1,61 @@
|
|||
/* This file is part of Mapnik (c++ mapping toolkit)
|
||||
* Copyright (C) 2005 Artem Pavlenko
|
||||
*
|
||||
* Mapnik is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
//$Id$
|
||||
|
||||
#ifndef FILTER_TO_STRING_HPP
|
||||
#define FILTER_TO_STRING_HPP
|
||||
|
||||
#include "filter.hpp"
|
||||
#include "expression.hpp"
|
||||
#include <set>
|
||||
|
||||
namespace mapnik
|
||||
{
|
||||
template <typename FeatureT>
|
||||
class filter_to_string : public filter_visitor<FeatureT>
|
||||
{
|
||||
private:
|
||||
std::string text_;
|
||||
public:
|
||||
filter_to_string() {}
|
||||
void visit(filter<FeatureT>& /*filter*/)
|
||||
{
|
||||
//not interested
|
||||
}
|
||||
void visit(expression<FeatureT>& exp)
|
||||
{
|
||||
property<FeatureT>* pf;
|
||||
if ((pf = dynamic_cast<property<FeatureT>*>(&exp)))
|
||||
{
|
||||
names_.insert(pf->name());
|
||||
}
|
||||
}
|
||||
std::string const& text() const
|
||||
{
|
||||
return text_;
|
||||
}
|
||||
|
||||
virtual ~filter_to_string() {}
|
||||
private:
|
||||
filter_to_string(filter_to_string const&);
|
||||
filter_to_string& operator=(filter_to_string const&);
|
||||
};
|
||||
}
|
||||
|
||||
#endif //FILTER_TO_STRING
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
//$Id$
|
||||
|
||||
#include "filter_parser.hh"
|
||||
#include "filter_parser.hpp"
|
||||
|
||||
using std::string;
|
||||
|
||||
|
@ -38,15 +38,15 @@ namespace mapnik
|
|||
parse_info<> info = parse(text,text+strlen(text),grammar,space_p);
|
||||
if (info.full && !filters.empty())
|
||||
{
|
||||
cout<<"success parsing filter expression\n";
|
||||
cout<<"success parsing filter expression:\n";
|
||||
cout<<filters.top()->to_string()<<"\n";
|
||||
return filters.top();
|
||||
}
|
||||
else
|
||||
{
|
||||
cout << "failed at: \": " << info.stop << "\n";
|
||||
cout << "failed at :" << info.stop << "\n";
|
||||
return filter_ptr(new null_filter<FeatureT>());
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
}
|
|
@ -1,306 +0,0 @@
|
|||
/* This file is part of Mapnik (c++ mapping toolkit)
|
||||
* Copyright (C) 2005 Artem Pavlenko
|
||||
*
|
||||
* Mapnik is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
//$Id$
|
||||
|
||||
#ifndef FILTER_PARSER_HH
|
||||
#define FILTER_PARSER_HH
|
||||
|
||||
#include <boost/spirit/core.hpp>
|
||||
#include <boost/spirit/symbols.hpp>
|
||||
|
||||
#include "value.hh"
|
||||
#include "expression.hh"
|
||||
#include "filter.hh"
|
||||
|
||||
#include <stack>
|
||||
#include <iostream>
|
||||
|
||||
using namespace boost::spirit;
|
||||
using std::string;
|
||||
using std::cout;
|
||||
using std::stack;
|
||||
|
||||
namespace mapnik
|
||||
{
|
||||
template <typename FeatureT>
|
||||
struct push_integer
|
||||
{
|
||||
push_integer(stack<ref_ptr<expression<FeatureT> > >& exprs)
|
||||
: exprs_(exprs) {}
|
||||
|
||||
void operator() (int val) const
|
||||
{
|
||||
cout << "push int("<<val<<")\n";
|
||||
exprs_.push(ref_ptr<expression<FeatureT> >(new literal<FeatureT>(val)));
|
||||
}
|
||||
stack<ref_ptr<expression<FeatureT> > >& exprs_;
|
||||
};
|
||||
|
||||
template <typename FeatureT>
|
||||
struct push_real
|
||||
{
|
||||
push_real(stack<ref_ptr<expression<FeatureT> > >& exprs)
|
||||
: exprs_(exprs) {}
|
||||
void operator() (double val) const
|
||||
{
|
||||
cout << "push real("<<val<<")\n";
|
||||
exprs_.push(ref_ptr<expression<FeatureT> >(new literal<FeatureT>(val)));
|
||||
}
|
||||
stack<ref_ptr<expression<FeatureT> > >& exprs_;
|
||||
};
|
||||
|
||||
template <typename FeatureT>
|
||||
struct push_string
|
||||
{
|
||||
push_string(stack<ref_ptr<expression<FeatureT> > >& exprs)
|
||||
: exprs_(exprs) {}
|
||||
|
||||
template <typename Iter>
|
||||
void operator() (Iter start,Iter end) const
|
||||
{
|
||||
string str(start,end);
|
||||
cout << "push string("<<str<<")\n";
|
||||
exprs_.push(ref_ptr<expression<FeatureT> >(new literal<FeatureT>(str)));
|
||||
}
|
||||
stack<ref_ptr<expression<FeatureT> > >& exprs_;
|
||||
};
|
||||
|
||||
template <typename FeatureT>
|
||||
struct push_property
|
||||
{
|
||||
push_property(stack<ref_ptr<expression<FeatureT> > >& exprs)
|
||||
: exprs_(exprs) {}
|
||||
|
||||
template <typename Iter>
|
||||
void operator() (Iter start,Iter end) const
|
||||
{
|
||||
string str(start,end);
|
||||
cout << "property name ["<<str<<"]\n";
|
||||
exprs_.push(ref_ptr<expression<FeatureT> >(new property<FeatureT>(str)));
|
||||
}
|
||||
stack<ref_ptr<expression<FeatureT> > >& exprs_;
|
||||
};
|
||||
|
||||
template <typename FeatureT,typename Op>
|
||||
struct compose_expression
|
||||
{
|
||||
compose_expression(stack<ref_ptr<expression<FeatureT> > >& exprs)
|
||||
: exprs_(exprs) {}
|
||||
|
||||
template <typename Iter>
|
||||
void operator() (Iter,Iter) const
|
||||
{
|
||||
if (exprs_.size()>=2)
|
||||
{
|
||||
ref_ptr<expression<FeatureT> > right = exprs_.top();
|
||||
exprs_.pop();
|
||||
ref_ptr<expression<FeatureT> > left = exprs_.top();
|
||||
exprs_.pop();
|
||||
if (left && right)
|
||||
{
|
||||
exprs_.push(ref_ptr<expression<FeatureT> >(new math_expr_b<FeatureT,Op>(*left,*right)));
|
||||
}
|
||||
}
|
||||
}
|
||||
stack<ref_ptr<expression<FeatureT> > >& exprs_;
|
||||
};
|
||||
|
||||
template <typename FeatureT,typename Op>
|
||||
struct compose_filter
|
||||
{
|
||||
compose_filter(stack<ref_ptr<filter<FeatureT> > >& filters,
|
||||
stack<ref_ptr<expression<FeatureT> > >& exprs)
|
||||
: filters_(filters),exprs_(exprs) {}
|
||||
|
||||
template <typename Iter>
|
||||
void operator() (Iter,Iter) const
|
||||
{
|
||||
if (exprs_.size()>=2)
|
||||
{
|
||||
ref_ptr<expression<FeatureT> > right = exprs_.top();
|
||||
exprs_.pop();
|
||||
ref_ptr<expression<FeatureT> > left = exprs_.top();
|
||||
exprs_.pop();
|
||||
if (left && right)
|
||||
{
|
||||
filters_.push(ref_ptr<filter<FeatureT> >(new compare_filter<FeatureT,Op>(*left,*right)));
|
||||
}
|
||||
}
|
||||
}
|
||||
stack<ref_ptr<filter<FeatureT> > >& filters_;
|
||||
stack<ref_ptr<expression<FeatureT> > >& exprs_;
|
||||
};
|
||||
|
||||
template <typename FeatureT>
|
||||
struct compose_and_filter
|
||||
{
|
||||
compose_and_filter(stack<ref_ptr<filter<FeatureT> > >& filters)
|
||||
: filters_(filters) {}
|
||||
|
||||
template <typename Iter>
|
||||
void operator() (Iter,Iter) const
|
||||
{
|
||||
if (filters_.size()>=2)
|
||||
{
|
||||
ref_ptr<filter<FeatureT> > right = filters_.top();
|
||||
filters_.pop();
|
||||
ref_ptr<filter<FeatureT> > left = filters_.top();
|
||||
filters_.pop();
|
||||
if (left && right)
|
||||
{
|
||||
filters_.push(ref_ptr<filter<FeatureT> >(new logical_and<FeatureT>(*left,*right)));
|
||||
}
|
||||
}
|
||||
}
|
||||
stack<ref_ptr<filter<FeatureT> > >& filters_;
|
||||
};
|
||||
|
||||
template <typename FeatureT>
|
||||
struct compose_or_filter
|
||||
{
|
||||
compose_or_filter(stack<ref_ptr<filter<FeatureT> > >& filters)
|
||||
: filters_(filters) {}
|
||||
|
||||
template <typename Iter>
|
||||
void operator() (Iter,Iter) const
|
||||
{
|
||||
if (filters_.size()>=2)
|
||||
{
|
||||
ref_ptr<filter<FeatureT> > right = filters_.top();
|
||||
filters_.pop();
|
||||
ref_ptr<filter<FeatureT> > left = filters_.top();
|
||||
filters_.pop();
|
||||
if (left && right)
|
||||
{
|
||||
filters_.push(ref_ptr<filter<FeatureT> >(new logical_or<FeatureT>(*left,*right)));
|
||||
}
|
||||
}
|
||||
}
|
||||
stack<ref_ptr<filter<FeatureT> > >& filters_;
|
||||
};
|
||||
|
||||
template <typename FeatureT>
|
||||
struct compose_not_filter
|
||||
{
|
||||
compose_not_filter(stack<ref_ptr<filter<FeatureT> > >& filters)
|
||||
: filters_(filters) {}
|
||||
|
||||
template <typename Iter>
|
||||
void operator() (Iter,Iter) const
|
||||
{
|
||||
if (filters_.size()>=1)
|
||||
{
|
||||
ref_ptr<filter<FeatureT> > filter_ = filters_.top();
|
||||
filters_.pop();
|
||||
if (filter_)
|
||||
{
|
||||
filters_.push(ref_ptr<filter<FeatureT> >(new logical_not<FeatureT>(*filter_)));
|
||||
}
|
||||
}
|
||||
}
|
||||
stack<ref_ptr<filter<FeatureT> > >& filters_;
|
||||
};
|
||||
|
||||
template <typename FeatureT>
|
||||
struct filter_grammar : public grammar<filter_grammar<FeatureT> >
|
||||
{
|
||||
filter_grammar(stack<ref_ptr<filter<FeatureT> > >& filters_,
|
||||
stack<ref_ptr<expression<FeatureT> > >& exprs_)
|
||||
: filters(filters_),exprs(exprs_) {}
|
||||
|
||||
template <typename ScannerT>
|
||||
struct definition
|
||||
{
|
||||
definition(filter_grammar const& self)
|
||||
{
|
||||
|
||||
func1_op = "sqrt","sin","cos";
|
||||
func2_op = "min","max";
|
||||
spatial_op = "Equals","Disjoint","Touches","Within","Overlaps",
|
||||
"Crosses","Intersects","Contains","DWithin","Beyond","BBOX";
|
||||
|
||||
number = strict_real_p [push_real<FeatureT>(self.exprs)]
|
||||
| int_p [push_integer<FeatureT>(self.exprs)];
|
||||
string_ ='\''>> ( (alpha_p | '_') >>
|
||||
* (alnum_p | '_' )) [push_string<FeatureT>(self.exprs)] >> '\'';
|
||||
property = '[' >> ( (alpha_p | '_')
|
||||
>> * (alnum_p | '_' ))[push_property<FeatureT>(self.exprs)]>>']';
|
||||
|
||||
literal = number | string_ | property;
|
||||
|
||||
function = literal | ( func1_op >> '('>> literal >> ')') |
|
||||
(func2_op >> '(' >> literal >>','>> literal >> ')');
|
||||
factor = function
|
||||
| '(' >> or_expr >> ')'
|
||||
| ( '-' >> factor)
|
||||
;
|
||||
term = factor
|
||||
>> *(('*' >> factor) [compose_expression<FeatureT,mult<value> >(self.exprs)]
|
||||
| ('/' >> factor) [compose_expression<FeatureT,div<value> >(self.exprs)]);
|
||||
|
||||
expression = term >> *(('+' >> term) [compose_expression<FeatureT,add<value> >(self.exprs)]
|
||||
| ('-' >> term) [compose_expression<FeatureT,sub<value> >(self.exprs)]);
|
||||
|
||||
relation = expression
|
||||
>> *((">=" >> expression)
|
||||
[compose_filter<FeatureT,greater_than_or_equal<value> >(self.filters,self.exprs)]
|
||||
| ('>' >> expression)
|
||||
[compose_filter<FeatureT,greater_than<value> >(self.filters,self.exprs)]
|
||||
| ('<' >> expression)
|
||||
[compose_filter<FeatureT,less_than<value> >(self.filters,self.exprs)]
|
||||
| ("<=" >> expression)
|
||||
[compose_filter<FeatureT,less_than_or_equal<value> >(self.filters,self.exprs)]);
|
||||
|
||||
equation = relation >> *( ( '=' >> relation)
|
||||
[compose_filter<FeatureT,equals<value> >(self.filters,self.exprs)]
|
||||
| ( "<>" >> relation)
|
||||
[compose_filter<FeatureT,not_equals<value> >(self.filters,self.exprs)]);
|
||||
not_expr = equation | *(str_p("not") >> equation)[compose_not_filter<FeatureT>(self.filters)];
|
||||
and_expr = not_expr >> *("and" >> not_expr)[compose_and_filter<FeatureT>(self.filters)];
|
||||
or_expr = and_expr >> *("or" >> and_expr)[compose_or_filter<FeatureT>(self.filters)];
|
||||
filter_statement = or_expr;
|
||||
}
|
||||
|
||||
boost::spirit::rule<ScannerT> const& start() const
|
||||
{
|
||||
return filter_statement;
|
||||
}
|
||||
|
||||
boost::spirit::rule<ScannerT> factor;
|
||||
boost::spirit::rule<ScannerT> term;
|
||||
boost::spirit::rule<ScannerT> expression;
|
||||
boost::spirit::rule<ScannerT> relation;
|
||||
boost::spirit::rule<ScannerT> equation;
|
||||
boost::spirit::rule<ScannerT> not_expr;
|
||||
boost::spirit::rule<ScannerT> and_expr;
|
||||
boost::spirit::rule<ScannerT> or_expr;
|
||||
|
||||
boost::spirit::rule<ScannerT> filter_statement;
|
||||
boost::spirit::rule<ScannerT> literal,number,string_,property,function;
|
||||
symbols<string> func1_op;
|
||||
symbols<string> func2_op;
|
||||
symbols<string> spatial_op;
|
||||
};
|
||||
stack<ref_ptr<filter<FeatureT> > >& filters;
|
||||
stack<ref_ptr<expression<FeatureT> > >& exprs;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif //FILTER_PARSER_HH
|
440
include/filter_parser.hpp
Normal file
440
include/filter_parser.hpp
Normal file
|
@ -0,0 +1,440 @@
|
|||
/* This file is part of Mapnik (c++ mapping toolkit)
|
||||
* Copyright (C) 2005 Artem Pavlenko
|
||||
*
|
||||
* Mapnik is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
//$Id$
|
||||
|
||||
#ifndef FILTER_PARSER_HPP
|
||||
#define FILTER_PARSER_HPP
|
||||
|
||||
#include <boost/spirit/core.hpp>
|
||||
#include <boost/spirit/symbols.hpp>
|
||||
#include <boost/spirit/utility/confix.hpp>
|
||||
#include <boost/spirit/utility/escape_char.hpp>
|
||||
#include <boost/spirit/utility/chset.hpp>
|
||||
|
||||
#include "value.hpp"
|
||||
#include "comparison.hpp"
|
||||
#include "expression.hpp"
|
||||
#include "filter.hpp"
|
||||
#include "regex_filter.hpp"
|
||||
|
||||
#include <stack>
|
||||
#include <iostream>
|
||||
|
||||
using namespace boost::spirit;
|
||||
using std::string;
|
||||
using std::cout;
|
||||
using std::cerr;
|
||||
using std::stack;
|
||||
|
||||
namespace mapnik
|
||||
{
|
||||
template <typename FeatureT>
|
||||
struct push_integer
|
||||
{
|
||||
push_integer(stack<ref_ptr<expression<FeatureT> > >& exprs)
|
||||
: exprs_(exprs) {}
|
||||
|
||||
void operator() (int val) const
|
||||
{
|
||||
exprs_.push(ref_ptr<expression<FeatureT> >(new literal<FeatureT>(val)));
|
||||
}
|
||||
stack<ref_ptr<expression<FeatureT> > >& exprs_;
|
||||
};
|
||||
|
||||
template <typename FeatureT>
|
||||
struct push_real
|
||||
{
|
||||
push_real(stack<ref_ptr<expression<FeatureT> > >& exprs)
|
||||
: exprs_(exprs) {}
|
||||
void operator() (double val) const
|
||||
{
|
||||
exprs_.push(ref_ptr<expression<FeatureT> >(new literal<FeatureT>(val)));
|
||||
}
|
||||
stack<ref_ptr<expression<FeatureT> > >& exprs_;
|
||||
};
|
||||
|
||||
template <typename FeatureT>
|
||||
struct push_string
|
||||
{
|
||||
push_string(stack<ref_ptr<expression<FeatureT> > >& exprs)
|
||||
: exprs_(exprs) {}
|
||||
|
||||
template <typename Iter>
|
||||
void operator() (Iter start,Iter end) const
|
||||
{
|
||||
string str(start,end);
|
||||
char quote='\\';
|
||||
string::size_type idx;
|
||||
idx = str.find(quote);
|
||||
while (idx != string::npos)
|
||||
{
|
||||
str.erase(idx,1);
|
||||
idx = str.find(quote);
|
||||
}
|
||||
cout << "string(\""<<str<<"\")\n";
|
||||
exprs_.push(ref_ptr<expression<FeatureT> >(new literal<FeatureT>(str)));
|
||||
}
|
||||
stack<ref_ptr<expression<FeatureT> > >& exprs_;
|
||||
};
|
||||
|
||||
template <typename FeatureT>
|
||||
struct push_property
|
||||
{
|
||||
push_property(stack<ref_ptr<expression<FeatureT> > >& exprs)
|
||||
: exprs_(exprs) {}
|
||||
|
||||
template <typename Iter>
|
||||
void operator() (Iter start,Iter end) const
|
||||
{
|
||||
string str(start,end);
|
||||
exprs_.push(ref_ptr<expression<FeatureT> >(new property<FeatureT>(str)));
|
||||
}
|
||||
stack<ref_ptr<expression<FeatureT> > >& exprs_;
|
||||
};
|
||||
|
||||
template <typename FeatureT,typename Op>
|
||||
struct compose_expression
|
||||
{
|
||||
compose_expression(stack<ref_ptr<expression<FeatureT> > >& exprs)
|
||||
: exprs_(exprs) {}
|
||||
|
||||
template <typename Iter>
|
||||
void operator() (Iter,Iter) const
|
||||
{
|
||||
if (exprs_.size()>=2)
|
||||
{
|
||||
ref_ptr<expression<FeatureT> > right = exprs_.top();
|
||||
exprs_.pop();
|
||||
ref_ptr<expression<FeatureT> > left = exprs_.top();
|
||||
exprs_.pop();
|
||||
if (left && right)
|
||||
{
|
||||
exprs_.push(ref_ptr<expression<FeatureT> >(new math_expr_b<FeatureT,Op>(*left,*right)));
|
||||
}
|
||||
}
|
||||
}
|
||||
stack<ref_ptr<expression<FeatureT> > >& exprs_;
|
||||
};
|
||||
|
||||
template <typename FeatureT>
|
||||
struct compose_regex
|
||||
{
|
||||
compose_regex(stack<ref_ptr<filter<FeatureT> > >& filters,
|
||||
stack<ref_ptr<expression<FeatureT> > >& exprs)
|
||||
: filters_(filters),exprs_(exprs) {}
|
||||
|
||||
template <typename Iter>
|
||||
void operator() (Iter start,Iter end) const
|
||||
{
|
||||
if (exprs_.size()>=1)
|
||||
{
|
||||
ref_ptr<expression<FeatureT> > exp = exprs_.top();
|
||||
exprs_.pop();
|
||||
if (exp)
|
||||
{
|
||||
std::string pattern(start,end);
|
||||
try
|
||||
{
|
||||
filters_.push(ref_ptr<filter<FeatureT> >(new regex_filter<FeatureT>(*exp,pattern)));
|
||||
}
|
||||
catch (boost::regex_error& ex)
|
||||
{
|
||||
cerr<<ex.what()<<"\n";
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
stack<ref_ptr<filter<FeatureT> > >& filters_;
|
||||
stack<ref_ptr<expression<FeatureT> > >& exprs_;
|
||||
};
|
||||
|
||||
|
||||
template <typename FeatureT,typename Op>
|
||||
struct compose_filter
|
||||
{
|
||||
compose_filter(stack<ref_ptr<filter<FeatureT> > >& filters,
|
||||
stack<ref_ptr<expression<FeatureT> > >& exprs)
|
||||
: filters_(filters),exprs_(exprs) {}
|
||||
|
||||
template <typename Iter>
|
||||
void operator() (Iter,Iter) const
|
||||
{
|
||||
if (exprs_.size()>=2)
|
||||
{
|
||||
ref_ptr<expression<FeatureT> > right = exprs_.top();
|
||||
exprs_.pop();
|
||||
ref_ptr<expression<FeatureT> > left = exprs_.top();
|
||||
exprs_.pop();
|
||||
if (left && right)
|
||||
{
|
||||
filters_.push(ref_ptr<filter<FeatureT> >(new compare_filter<FeatureT,Op>(*left,*right)));
|
||||
}
|
||||
}
|
||||
}
|
||||
stack<ref_ptr<filter<FeatureT> > >& filters_;
|
||||
stack<ref_ptr<expression<FeatureT> > >& exprs_;
|
||||
};
|
||||
|
||||
template <typename FeatureT>
|
||||
struct compose_and_filter
|
||||
{
|
||||
compose_and_filter(stack<ref_ptr<filter<FeatureT> > >& filters)
|
||||
: filters_(filters) {}
|
||||
|
||||
template <typename Iter>
|
||||
void operator() (Iter,Iter) const
|
||||
{
|
||||
if (filters_.size()>=2)
|
||||
{
|
||||
ref_ptr<filter<FeatureT> > right = filters_.top();
|
||||
filters_.pop();
|
||||
ref_ptr<filter<FeatureT> > left = filters_.top();
|
||||
filters_.pop();
|
||||
if (left && right)
|
||||
{
|
||||
filters_.push(ref_ptr<filter<FeatureT> >(new logical_and<FeatureT>(*left,*right)));
|
||||
}
|
||||
}
|
||||
}
|
||||
stack<ref_ptr<filter<FeatureT> > >& filters_;
|
||||
};
|
||||
|
||||
template <typename FeatureT>
|
||||
struct compose_or_filter
|
||||
{
|
||||
compose_or_filter(stack<ref_ptr<filter<FeatureT> > >& filters)
|
||||
: filters_(filters) {}
|
||||
|
||||
template <typename Iter>
|
||||
void operator() (Iter,Iter) const
|
||||
{
|
||||
if (filters_.size()>=2)
|
||||
{
|
||||
ref_ptr<filter<FeatureT> > right = filters_.top();
|
||||
filters_.pop();
|
||||
ref_ptr<filter<FeatureT> > left = filters_.top();
|
||||
filters_.pop();
|
||||
if (left && right)
|
||||
{
|
||||
filters_.push(ref_ptr<filter<FeatureT> >(new logical_or<FeatureT>(*left,*right)));
|
||||
}
|
||||
}
|
||||
}
|
||||
stack<ref_ptr<filter<FeatureT> > >& filters_;
|
||||
};
|
||||
|
||||
template <typename FeatureT>
|
||||
struct compose_not_filter
|
||||
{
|
||||
compose_not_filter(stack<ref_ptr<filter<FeatureT> > >& filters)
|
||||
: filters_(filters) {}
|
||||
|
||||
template <typename Iter>
|
||||
void operator() (Iter,Iter) const
|
||||
{
|
||||
if (filters_.size()>=1)
|
||||
{
|
||||
ref_ptr<filter<FeatureT> > filter_ = filters_.top();
|
||||
filters_.pop();
|
||||
if (filter_)
|
||||
{
|
||||
filters_.push(ref_ptr<filter<FeatureT> >(new logical_not<FeatureT>(*filter_)));
|
||||
}
|
||||
}
|
||||
}
|
||||
stack<ref_ptr<filter<FeatureT> > >& filters_;
|
||||
};
|
||||
|
||||
template <typename FeatureT>
|
||||
struct filter_grammar : public grammar<filter_grammar<FeatureT> >
|
||||
{
|
||||
filter_grammar(stack<ref_ptr<filter<FeatureT> > >& filters_,
|
||||
stack<ref_ptr<expression<FeatureT> > >& exprs_)
|
||||
: filters(filters_),exprs(exprs_) {}
|
||||
|
||||
template <typename ScannerT>
|
||||
struct definition
|
||||
{
|
||||
definition(filter_grammar const& self)
|
||||
{
|
||||
typedef boost::spirit::chset<wchar_t> chset_t;
|
||||
|
||||
func1_op = "sqrt","sin","cos";
|
||||
func2_op = "min","max";
|
||||
spatial_op = "Equals","Disjoint","Touches","Within","Overlaps",
|
||||
"Crosses","Intersects","Contains","DWithin","Beyond","BBOX";
|
||||
|
||||
chset_t BaseChar (L"\x41-\x5A\x61-\x7A\xC0-\xD6\xD8-\xF6\xF8-\xFF\x100-\x131\x134-\x13E"
|
||||
L"\x141-\x148\x14A-\x17E\x180-\x1C3\x1CD-\x1F0\x1F4-\x1F5\x1FA-\x217"
|
||||
L"\x250-\x2A8\x2BB-\x2C1\x386\x388-\x38A\x38C\x38E-\x3A1\x3A3-\x3CE"
|
||||
L"\x3D0-\x3D6\x3DA\x3DC\x3DE\x3E0\x3E2-\x3F3\x401-\x40C\x40E-\x44F"
|
||||
L"\x451-\x45C\x45E-\x481\x490-\x4C4\x4C7-\x4C8\x4CB-\x4CC\x4D0-\x4EB"
|
||||
L"\x4EE-\x4F5\x4F8-\x4F9\x531-\x556\x559\x561-\x586\x5D0-\x5EA"
|
||||
L"\x5F0-\x5F2\x621-\x63A\x641-\x64A\x671-\x6B7\x6BA-\x6BE\x6C0-\x6CE"
|
||||
L"\x6D0-\x6D3\x6D5\x6E5-\x6E6\x905-\x939\x93D\x958-\x961\x985-\x98C"
|
||||
L"\x98F-\x990\x993-\x9A8\x9AA-\x9B0\x9B2\x9B6-\x9B9\x9DC-\x9DD"
|
||||
L"\x9DF-\x9E1\x9F0-\x9F1\xA05-\xA0A\xA0F-\xA10\xA13-\xA28\xA2A-\xA30"
|
||||
L"\xA32-\xA33\xA35-\xA36\xA38-\xA39\xA59-\xA5C\xA5E\xA72-\xA74"
|
||||
L"\xA85-\xA8B\xA8D\xA8F-\xA91\xA93-\xAA8\xAAA-\xAB0\xAB2-\xAB3"
|
||||
L"\xAB5-\xAB9\xABD\xAE0\xB05-\xB0C\xB0F-\xB10\xB13-\xB28\xB2A-\xB30"
|
||||
L"\xB32-\xB33\xB36-\xB39\xB3D\xB5C-\xB5D\xB5F-\xB61\xB85-\xB8A"
|
||||
L"\xB8E-\xB90\xB92-\xB95\xB99-\xB9A\xB9C\xB9E-\xB9F\xBA3-\xBA4"
|
||||
L"\xBA8-\xBAA\xBAE-\xBB5\xBB7-\xBB9\xC05-\xC0C\xC0E-\xC10\xC12-\xC28"
|
||||
L"\xC2A-\xC33\xC35-\xC39\xC60-\xC61\xC85-\xC8C\xC8E-\xC90\xC92-\xCA8"
|
||||
L"\xCAA-\xCB3\xCB5-\xCB9\xCDE\xCE0-\xCE1\xD05-\xD0C\xD0E-\xD10"
|
||||
L"\xD12-\xD28\xD2A-\xD39\xD60-\xD61\xE01-\xE2E\xE30\xE32-\xE33"
|
||||
L"\xE40-\xE45\xE81-\xE82\xE84\xE87-\xE88\xE8A\xE8D\xE94-\xE97"
|
||||
L"\xE99-\xE9F\xEA1-\xEA3\xEA5\xEA7\xEAA-\xEAB\xEAD-\xEAE\xEB0"
|
||||
L"\xEB2-\xEB3\xEBD\xEC0-\xEC4\xF40-\xF47\xF49-\xF69\x10A0-\x10C5"
|
||||
L"\x10D0-\x10F6\x1100\x1102-\x1103\x1105-\x1107\x1109\x110B-\x110C"
|
||||
L"\x110E-\x1112\x113C\x113E\x1140\x114C\x114E\x1150\x1154-\x1155"
|
||||
L"\x1159\x115F-\x1161\x1163\x1165\x1167\x1169\x116D-\x116E"
|
||||
L"\x1172-\x1173\x1175\x119E\x11A8\x11AB\x11AE-\x11AF\x11B7-\x11B8"
|
||||
L"\x11BA\x11BC-\x11C2\x11EB\x11F0\x11F9\x1E00-\x1E9B\x1EA0-\x1EF9"
|
||||
L"\x1F00-\x1F15\x1F18-\x1F1D\x1F20-\x1F45\x1F48-\x1F4D\x1F50-\x1F57"
|
||||
L"\x1F59\x1F5B\x1F5D\x1F5F-\x1F7D\x1F80-\x1FB4\x1FB6-\x1FBC\x1FBE"
|
||||
L"\x1FC2-\x1FC4\x1FC6-\x1FCC\x1FD0-\x1FD3\x1FD6-\x1FDB\x1FE0-\x1FEC"
|
||||
L"\x1FF2-\x1FF4\x1FF6-\x1FFC\x2126\x212A-\x212B\x212E\x2180-\x2182"
|
||||
L"\x3041-\x3094\x30A1-\x30FA\x3105-\x312C\xAC00-\xD7A3");
|
||||
|
||||
chset_t Ideographic(L"\x4E00-\x9FA5\x3007\x3021-\x3029");
|
||||
chset_t Letter = BaseChar | Ideographic;
|
||||
|
||||
chset_t CombiningChar(L"\x0300-\x0345\x0360-\x0361\x0483-\x0486\x0591-\x05A1\x05A3-\x05B9"
|
||||
L"\x05BB-\x05BD\x05BF\x05C1-\x05C2\x05C4\x064B-\x0652\x0670"
|
||||
L"\x06D6-\x06DC\x06DD-\x06DF\x06E0-\x06E4\x06E7-\x06E8\x06EA-\x06ED"
|
||||
L"\x0901-\x0903\x093C\x093E-\x094C\x094D\x0951-\x0954\x0962-\x0963"
|
||||
L"\x0981-\x0983\x09BC\x09BE\x09BF\x09C0-\x09C4\x09C7-\x09C8"
|
||||
L"\x09CB-\x09CD\x09D7\x09E2-\x09E3\x0A02\x0A3C\x0A3E\x0A3F"
|
||||
L"\x0A40-\x0A42\x0A47-\x0A48\x0A4B-\x0A4D\x0A70-\x0A71\x0A81-\x0A83"
|
||||
L"\x0ABC\x0ABE-\x0AC5\x0AC7-\x0AC9\x0ACB-\x0ACD\x0B01-\x0B03\x0B3C"
|
||||
L"\x0B3E-\x0B43\x0B47-\x0B48\x0B4B-\x0B4D\x0B56-\x0B57\x0B82-\x0B83"
|
||||
L"\x0BBE-\x0BC2\x0BC6-\x0BC8\x0BCA-\x0BCD\x0BD7\x0C01-\x0C03"
|
||||
L"\x0C3E-\x0C44\x0C46-\x0C48\x0C4A-\x0C4D\x0C55-\x0C56\x0C82-\x0C83"
|
||||
L"\x0CBE-\x0CC4\x0CC6-\x0CC8\x0CCA-\x0CCD\x0CD5-\x0CD6\x0D02-\x0D03"
|
||||
L"\x0D3E-\x0D43\x0D46-\x0D48\x0D4A-\x0D4D\x0D57\x0E31\x0E34-\x0E3A"
|
||||
L"\x0E47-\x0E4E\x0EB1\x0EB4-\x0EB9\x0EBB-\x0EBC\x0EC8-\x0ECD"
|
||||
L"\x0F18-\x0F19\x0F35\x0F37\x0F39\x0F3E\x0F3F\x0F71-\x0F84"
|
||||
L"\x0F86-\x0F8B\x0F90-\x0F95\x0F97\x0F99-\x0FAD\x0FB1-\x0FB7\x0FB9"
|
||||
L"\x20D0-\x20DC\x20E1\x302A-\x302F\x3099\x309A");
|
||||
|
||||
chset_t Digit(L"\x0030-\x0039\x0660-\x0669\x06F0-\x06F9\x0966-\x096F\x09E6-\x09EF"
|
||||
L"\x0A66-\x0A6F\x0AE6-\x0AEF\x0B66-\x0B6F\x0BE7-\x0BEF\x0C66-\x0C6F"
|
||||
L"\x0CE6-\x0CEF\x0D66-\x0D6F\x0E50-\x0E59\x0ED0-\x0ED9\x0F20-\x0F29");
|
||||
|
||||
chset_t Extender(L"\x00B7\x02D0\x02D1\x0387\x0640\x0E46\x0EC6\x3005\x3031-\x3035"
|
||||
L"\x309D-\x309E\x30FC-\x30FE");
|
||||
|
||||
chset_t NameChar =
|
||||
Letter
|
||||
| Digit
|
||||
| L'.'
|
||||
| L'-'
|
||||
| L'_'
|
||||
| L':'
|
||||
| CombiningChar
|
||||
| Extender;
|
||||
|
||||
number = strict_real_p [push_real<FeatureT>(self.exprs)]
|
||||
| int_p [push_integer<FeatureT>(self.exprs)];
|
||||
|
||||
string_ = confix_p(L'\'',(*lex_escape_ch_p)
|
||||
[push_string<FeatureT>(self.exprs)],
|
||||
'\'');
|
||||
|
||||
property = L'[' >> ( (Letter | L'_' | L':')
|
||||
>> *NameChar )[push_property<FeatureT>(self.exprs)] >> L']';
|
||||
|
||||
literal = number | string_ | property;
|
||||
|
||||
function = literal | ( func1_op >> L'('>> literal >> L')') |
|
||||
(func2_op >> L'(' >> literal >> L','>> literal >> L')');
|
||||
|
||||
factor = function
|
||||
| L'(' >> or_expr >> L')'
|
||||
| ( L'-' >> factor)
|
||||
;
|
||||
term = factor
|
||||
>> *((L'*' >> factor) [compose_expression<FeatureT,mapnik::mult<value> >(self.exprs)]
|
||||
| (L'/' >> factor) [compose_expression<FeatureT,mapnik::div<value> >(self.exprs)]);
|
||||
|
||||
expression = term >> *((L'+' >> term) [compose_expression<FeatureT,mapnik::add<value> >(self.exprs)]
|
||||
| (L'-' >> term) [compose_expression<FeatureT,mapnik::sub<value> >(self.exprs)]);
|
||||
|
||||
regex = str_p(L".match")>>L'('>>confix_p(L'\'',(*lex_escape_ch_p)
|
||||
[compose_regex<FeatureT>(self.filters,self.exprs)],
|
||||
L'\'') >>L')';
|
||||
|
||||
relation = expression
|
||||
>> *((L">=" >> expression)
|
||||
[compose_filter<FeatureT,greater_than_or_equal<value> >(self.filters,self.exprs)]
|
||||
| (L'>' >> expression)
|
||||
[compose_filter<FeatureT,mapnik::greater_than<value> >(self.filters,self.exprs)]
|
||||
| (L'<' >> expression)
|
||||
[compose_filter<FeatureT,mapnik::less_than<value> >(self.filters,self.exprs)]
|
||||
| (L"<=" >> expression)
|
||||
[compose_filter<FeatureT,less_than_or_equal<value> >(self.filters,self.exprs)]
|
||||
| regex );
|
||||
|
||||
equation = relation >> *( ( L'=' >> relation)
|
||||
[compose_filter<FeatureT,mapnik::equals<value> >(self.filters,self.exprs)]
|
||||
| ( L"<>" >> relation)
|
||||
[compose_filter<FeatureT,not_equals<value> >(self.filters,self.exprs)]);
|
||||
|
||||
not_expr = equation | *(str_p(L"not") >> equation)[compose_not_filter<FeatureT>(self.filters)];
|
||||
|
||||
and_expr = not_expr >> *(L"and" >> not_expr)[compose_and_filter<FeatureT>(self.filters)];
|
||||
|
||||
or_expr = and_expr >> *(L"or" >> and_expr)[compose_or_filter<FeatureT>(self.filters)];
|
||||
|
||||
filter_statement = or_expr;
|
||||
}
|
||||
|
||||
boost::spirit::rule<ScannerT> const& start() const
|
||||
{
|
||||
return filter_statement;
|
||||
}
|
||||
|
||||
boost::spirit::rule<ScannerT> factor;
|
||||
boost::spirit::rule<ScannerT> term;
|
||||
boost::spirit::rule<ScannerT> expression;
|
||||
boost::spirit::rule<ScannerT> relation;
|
||||
boost::spirit::rule<ScannerT> equation;
|
||||
boost::spirit::rule<ScannerT> not_expr;
|
||||
boost::spirit::rule<ScannerT> and_expr;
|
||||
boost::spirit::rule<ScannerT> or_expr;
|
||||
|
||||
boost::spirit::rule<ScannerT> filter_statement;
|
||||
boost::spirit::rule<ScannerT> literal;
|
||||
boost::spirit::rule<ScannerT> number;
|
||||
boost::spirit::rule<ScannerT> string_;
|
||||
boost::spirit::rule<ScannerT> property;
|
||||
boost::spirit::rule<ScannerT> function;
|
||||
boost::spirit::rule<ScannerT> regex;
|
||||
symbols<string> func1_op;
|
||||
symbols<string> func2_op;
|
||||
symbols<string> spatial_op;
|
||||
};
|
||||
stack<ref_ptr<filter<FeatureT> > >& filters;
|
||||
stack<ref_ptr<expression<FeatureT> > >& exprs;
|
||||
};
|
||||
}
|
||||
|
||||
#endif //FILTER_PARSER_HPP
|
|
@ -18,8 +18,8 @@
|
|||
|
||||
//$Id$
|
||||
|
||||
#ifndef FILTER_PARSER_AST_HH
|
||||
#define FILTER_PARSER_AST_HH
|
||||
#ifndef FILTER_PARSER_AST_HPP
|
||||
#define FILTER_PARSER_AST_HPP
|
||||
|
||||
#include <boost/spirit/core.hpp>
|
||||
#include <boost/spirit/tree/ast.hpp>
|
||||
|
@ -258,4 +258,4 @@ namespace mapnik
|
|||
}
|
||||
}
|
||||
|
||||
#endif //FILTER_PARSER_AST_HH
|
||||
#endif //FILTER_PARSER_AST_HPP
|
|
@ -16,11 +16,11 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef FILTER_VISITOR_HH
|
||||
#define FILTER_VISITOR_HH
|
||||
#ifndef FILTER_VISITOR_HPP
|
||||
#define FILTER_VISITOR_HPP
|
||||
|
||||
#include "filter.hh"
|
||||
#include "expression.hh"
|
||||
#include "filter.hpp"
|
||||
#include "expression.hpp"
|
||||
|
||||
namespace mapnik
|
||||
{
|
||||
|
@ -35,4 +35,4 @@ namespace mapnik
|
|||
};
|
||||
}
|
||||
|
||||
#endif //FILTER_VISITOR_HH
|
||||
#endif //FILTER_VISITOR_HPP
|
|
@ -16,10 +16,10 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
//$Id$
|
||||
//$Id: gamma.hpp 39 2005-04-10 20:39:53Z pavlenko $
|
||||
|
||||
#ifndef GAMMA_HH
|
||||
#define GAMMA_HH
|
||||
#ifndef GAMMA_HPP
|
||||
#define GAMMA_HPP
|
||||
|
||||
namespace mapnik
|
||||
{
|
||||
|
@ -44,4 +44,4 @@ namespace mapnik
|
|||
};
|
||||
}
|
||||
|
||||
#endif //GAMMA_HH
|
||||
#endif //GAMMA_HPP
|
|
@ -16,12 +16,12 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
//$Id$
|
||||
//$Id: geom_util.hpp 39 2005-04-10 20:39:53Z pavlenko $
|
||||
|
||||
#ifndef GEOM_UTIL_HH
|
||||
#define GEOM_UTIL_HH
|
||||
#ifndef GEOM_UTIL_HPP
|
||||
#define GEOM_UTIL_HPP
|
||||
|
||||
#include "geometry.hh"
|
||||
#include "geometry.hpp"
|
||||
#include <cmath>
|
||||
|
||||
namespace mapnik
|
||||
|
@ -224,4 +224,4 @@ namespace mapnik
|
|||
|
||||
}
|
||||
|
||||
#endif //GEOM_UTIL_HH
|
||||
#endif //GEOM_UTIL_HPP
|
|
@ -16,15 +16,15 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
//$Id$
|
||||
//$Id: geometry.hpp 39 2005-04-10 20:39:53Z pavlenko $
|
||||
|
||||
#ifndef GEOMETRY_HH
|
||||
#define GEOMETRY_HH
|
||||
#ifndef GEOMETRY_HPP
|
||||
#define GEOMETRY_HPP
|
||||
|
||||
#include "vertex_vector.hh"
|
||||
#include "vertex_transform.hh"
|
||||
#include "ctrans.hh"
|
||||
#include "ptr.hh"
|
||||
#include "vertex_vector.hpp"
|
||||
#include "vertex_transform.hpp"
|
||||
#include "ctrans.hpp"
|
||||
#include "ptr.hpp"
|
||||
|
||||
namespace mapnik
|
||||
{
|
||||
|
@ -253,4 +253,4 @@ namespace mapnik
|
|||
typedef ref_ptr<geometry_type> geometry_ptr;
|
||||
}
|
||||
|
||||
#endif //GEOMETRY_HH
|
||||
#endif //GEOMETRY_HPP
|
|
@ -16,25 +16,25 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
//$Id$
|
||||
//$Id: graphics.hpp 39 2005-04-10 20:39:53Z pavlenko $
|
||||
|
||||
#ifndef GRAPHICS_HH
|
||||
#define GRAPHICS_HH
|
||||
#ifndef GRAPHICS_HPP
|
||||
#define GRAPHICS_HPP
|
||||
|
||||
#include <cmath>
|
||||
#include <string>
|
||||
#include <cassert>
|
||||
#include "style.hh"
|
||||
#include "gamma.hh"
|
||||
#include "image_data.hh"
|
||||
#include "style.hpp"
|
||||
#include "gamma.hpp"
|
||||
#include "image_data.hpp"
|
||||
|
||||
namespace mapnik
|
||||
{
|
||||
class Image32
|
||||
{
|
||||
private:
|
||||
int width_;
|
||||
int height_;
|
||||
unsigned width_;
|
||||
unsigned height_;
|
||||
Color background_;
|
||||
ImageData32 data_;
|
||||
static gamma gammaTable_;
|
||||
|
@ -43,8 +43,6 @@ namespace mapnik
|
|||
Image32(const Image32& rhs);
|
||||
~Image32();
|
||||
static void setGamma(double gamma);
|
||||
int width() const;
|
||||
int height() const;
|
||||
void setBackground(const Color& background);
|
||||
const Color& getBackground() const;
|
||||
void set_rectangle(unsigned x,unsigned y,const ImageData32& data);
|
||||
|
@ -65,9 +63,9 @@ namespace mapnik
|
|||
void saveToFile(const std::string& file,const std::string& format="auto");
|
||||
private:
|
||||
|
||||
inline bool checkBounds(int x,int y) const
|
||||
inline bool checkBounds(unsigned x,unsigned y) const
|
||||
{
|
||||
return (x>=0 && x<width_ && y>=0 && y<height_);
|
||||
return ( x < width_ && y < height_);
|
||||
}
|
||||
|
||||
public:
|
||||
|
@ -106,6 +104,16 @@ namespace mapnik
|
|||
data_(x,y)=nc;
|
||||
}
|
||||
}
|
||||
|
||||
inline unsigned width() const
|
||||
{
|
||||
return width_;
|
||||
}
|
||||
|
||||
inline unsigned height() const
|
||||
{
|
||||
return height_;
|
||||
}
|
||||
};
|
||||
}
|
||||
#endif //GRAPHICS_HH
|
||||
#endif //GRAPHICS_HPP
|
|
@ -16,10 +16,10 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
//$Id$
|
||||
//$Id: image_data.hpp 39 2005-04-10 20:39:53Z pavlenko $
|
||||
|
||||
#ifndef IMAGE_DATA_HH
|
||||
#define IMAGE_DATA_HH
|
||||
#ifndef IMAGE_DATA_HPP
|
||||
#define IMAGE_DATA_HPP
|
||||
|
||||
namespace mapnik
|
||||
{
|
||||
|
@ -119,4 +119,4 @@ namespace mapnik
|
|||
typedef ImageData<unsigned> ImageData32;
|
||||
}
|
||||
|
||||
#endif //IMAGE_DATA_HH
|
||||
#endif //IMAGE_DATA_HPP
|
|
@ -16,17 +16,17 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
//$Id$
|
||||
//$Id: image_reader.hpp 39 2005-04-10 20:39:53Z pavlenko $
|
||||
|
||||
#ifndef IMAGE_READER_HH
|
||||
#define IMAGE_READER_HH
|
||||
#ifndef IMAGE_READER_HPP
|
||||
#define IMAGE_READER_HPP
|
||||
|
||||
#include "mapnik.hh"
|
||||
#include "mapnik.hpp"
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
|
||||
namespace mapnik {
|
||||
|
||||
namespace mapnik
|
||||
{
|
||||
class ImageReaderException : public std::exception
|
||||
{
|
||||
private:
|
||||
|
@ -56,4 +56,4 @@ namespace mapnik {
|
|||
|
||||
}
|
||||
|
||||
#endif //IMAGE_READER_HH
|
||||
#endif //IMAGE_READER_HPP
|
|
@ -16,27 +16,25 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
//$Id$
|
||||
//$Id: image_symbolizer.hpp 39 2005-04-10 20:39:53Z pavlenko $
|
||||
|
||||
#ifndef IMAGE_SYMBOLIZER_HH
|
||||
#define IMAGE_SYMBOLIZER_HH
|
||||
#ifndef IMAGE_SYMBOLIZER_HPP
|
||||
#define IMAGE_SYMBOLIZER_HPP
|
||||
|
||||
|
||||
#include "symbolizer.hh"
|
||||
#include "image_data.hh"
|
||||
#include "symbolizer.hpp"
|
||||
#include "image_data.hpp"
|
||||
|
||||
namespace mapnik
|
||||
{
|
||||
struct ImageSymbolizer : public SymbolizerImpl
|
||||
{
|
||||
struct image_symbolizer : public symbolizer
|
||||
{
|
||||
private:
|
||||
std::string file_;
|
||||
std::string type_;
|
||||
ImageData32 symbol_;
|
||||
public:
|
||||
ImageSymbolizer(const std::string& file,const std::string& type,unsigned width,unsigned height)
|
||||
: SymbolizerImpl(),
|
||||
file_(file),
|
||||
image_symbolizer(std::string const& file,
|
||||
std::string const& type,
|
||||
unsigned width,unsigned height)
|
||||
: symbolizer(),
|
||||
symbol_(width,height)
|
||||
{
|
||||
try
|
||||
|
@ -52,7 +50,7 @@ namespace mapnik
|
|||
}
|
||||
}
|
||||
|
||||
virtual ~ImageSymbolizer() {}
|
||||
virtual ~image_symbolizer() {}
|
||||
|
||||
void render(geometry_type& geom,Image32& image) const
|
||||
{
|
||||
|
@ -61,7 +59,7 @@ namespace mapnik
|
|||
|
||||
geometry_type::path_iterator<SHIFT0> itr=geom.begin<SHIFT0>();
|
||||
while (itr!=geom.end<SHIFT0>())
|
||||
{
|
||||
{
|
||||
int x=itr->x;
|
||||
int y=itr->y;
|
||||
int px=int(x-0.5*w);
|
||||
|
@ -72,10 +70,9 @@ namespace mapnik
|
|||
}
|
||||
|
||||
private:
|
||||
ImageSymbolizer(const ImageSymbolizer&);
|
||||
ImageSymbolizer& operator=(const ImageSymbolizer&);
|
||||
|
||||
image_symbolizer(const image_symbolizer&);
|
||||
image_symbolizer& operator=(const image_symbolizer&);
|
||||
};
|
||||
}
|
||||
|
||||
#endif // IMAGE_SYMBOLIZER_HH
|
||||
#endif // IMAGE_SYMBOLIZER_HPP
|
|
@ -16,10 +16,10 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
//$Id$
|
||||
//$Id: image_util.hpp 39 2005-04-10 20:39:53Z pavlenko $
|
||||
|
||||
#ifndef IMAGE_UTIL_HH
|
||||
#define IMAGE_UTIL_HH
|
||||
#ifndef IMAGE_UTIL_HPP
|
||||
#define IMAGE_UTIL_HPP
|
||||
|
||||
namespace mapnik
|
||||
{
|
||||
|
@ -205,4 +205,4 @@ namespace mapnik
|
|||
}
|
||||
}
|
||||
|
||||
#endif //IMAGE_UTIL_HH
|
||||
#endif //IMAGE_UTIL_HPP
|
|
@ -18,25 +18,34 @@
|
|||
|
||||
//$Id$
|
||||
|
||||
#include "local_datasource.hh"
|
||||
#ifndef LABEL_PLACEMENT_HPP
|
||||
#define LABEL_PLACEMENT_HPP
|
||||
|
||||
namespace mapnik
|
||||
{
|
||||
local_datasource::local_datasource(Parameters const& params) {}
|
||||
local_datasource::~local_datasource() {}
|
||||
std::string local_datasource::name_="local";
|
||||
std::string local_datasource::name()
|
||||
struct point_
|
||||
{
|
||||
return name_;
|
||||
}
|
||||
|
||||
const Envelope<double>& local_datasource::envelope() const
|
||||
{
|
||||
return extent_;
|
||||
}
|
||||
double x;
|
||||
double y;
|
||||
point_()
|
||||
: x(0),y(0) {}
|
||||
point_(double x_,double y_)
|
||||
: x(x_),y(y_) {}
|
||||
};
|
||||
|
||||
featureset_ptr features(query const& q) const
|
||||
class label_placement
|
||||
{
|
||||
private:
|
||||
point_ anchor_;
|
||||
point_ displacement_;
|
||||
double rotation_;
|
||||
public:
|
||||
label_placement()
|
||||
: anchor_(),
|
||||
displacement_(),
|
||||
rotation_(0.0) {}
|
||||
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#endif //LABEL_PLACEMENT_HPP
|
|
@ -16,15 +16,15 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
//$Id$
|
||||
//$Id: layer.hpp 39 2005-04-10 20:39:53Z pavlenko $
|
||||
|
||||
#ifndef LAYER_HH
|
||||
#define LAYER_HH
|
||||
#ifndef LAYER_HPP
|
||||
#define LAYER_HPP
|
||||
|
||||
#include <vector>
|
||||
#include "feature.hh"
|
||||
#include "ptr.hh"
|
||||
#include "datasource.hh"
|
||||
#include "feature.hpp"
|
||||
#include "ptr.hpp"
|
||||
#include "datasource.hpp"
|
||||
|
||||
namespace mapnik
|
||||
{
|
||||
|
@ -37,8 +37,8 @@ namespace mapnik
|
|||
double maxZoom_;
|
||||
bool active_;
|
||||
bool selectable_;
|
||||
datasource_p ds_;
|
||||
std::string style_;
|
||||
datasource_p ds_;
|
||||
std::vector<std::string> styles_;
|
||||
std::string selection_style_;
|
||||
mutable std::vector<ref_ptr<Feature> > selection_;
|
||||
|
||||
|
@ -48,8 +48,8 @@ namespace mapnik
|
|||
Layer& operator=(const Layer& l);
|
||||
Parameters const& params() const;
|
||||
const std::string& name() const;
|
||||
void setStyle(const std::string& style);
|
||||
const std::string& getStyle() const;
|
||||
void add_style(std::string const& stylename);
|
||||
std::vector<std::string> const& styles() const;
|
||||
void selection_style(const std::string& name);
|
||||
const std::string& selection_style() const;
|
||||
void setMinZoom(double minZoom);
|
||||
|
@ -71,4 +71,4 @@ namespace mapnik
|
|||
void swap(const Layer& other);
|
||||
};
|
||||
}
|
||||
#endif //LAYER_HH
|
||||
#endif //LAYER_HPP
|
|
@ -16,14 +16,14 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
//$Id$
|
||||
//$Id: line_aa.hpp 39 2005-04-10 20:39:53Z pavlenko $
|
||||
|
||||
#ifndef LINE_AA_HH
|
||||
#define LINE_AA_HH
|
||||
#ifndef LINE_AA_HPP
|
||||
#define LINE_AA_HPP
|
||||
|
||||
#include "geometry.hh"
|
||||
#include "graphics.hh"
|
||||
#include "style.hh"
|
||||
#include "geometry.hpp"
|
||||
#include "graphics.hpp"
|
||||
#include "style.hpp"
|
||||
|
||||
namespace mapnik
|
||||
{
|
||||
|
@ -43,4 +43,4 @@ namespace mapnik
|
|||
void render_line(int x0,int y0,int x1,int y1,unsigned rgba);
|
||||
};
|
||||
}
|
||||
#endif //LINE_AA_HH
|
||||
#endif //LINE_AA_HPP
|
|
@ -1,132 +0,0 @@
|
|||
/* This file is part of Mapnik (c++ mapping toolkit)
|
||||
* Copyright (C) 2005 Artem Pavlenko
|
||||
*
|
||||
* Mapnik is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
//$Id$
|
||||
|
||||
#ifndef LINE_SYMBOLIZER_HH
|
||||
#define LINE_SYMBOLIZER_HH
|
||||
|
||||
#include "agg_basics.h"
|
||||
#include "agg_rendering_buffer.h"
|
||||
#include "agg_rasterizer_scanline_aa.h"
|
||||
#include "agg_conv_stroke.h"
|
||||
#include "agg_conv_curve.h"
|
||||
#include "agg_conv_dash.h"
|
||||
#include "agg_conv_contour.h"
|
||||
#include "agg_conv_stroke.h"
|
||||
#include "agg_vcgen_stroke.h"
|
||||
#include "agg_conv_adaptor_vcgen.h"
|
||||
#include "agg_conv_smooth_poly1.h"
|
||||
#include "agg_conv_marker.h"
|
||||
#include "agg_arrowhead.h"
|
||||
#include "agg_vcgen_markers_term.h"
|
||||
#include "agg_scanline_p.h"
|
||||
#include "agg_scanline_u.h"
|
||||
#include "agg_renderer_scanline.h"
|
||||
#include "agg_pixfmt_rgba32.h"
|
||||
#include "agg_path_storage.h"
|
||||
#include "agg_renderer_outline_aa.h"
|
||||
#include "agg_rasterizer_outline_aa.h"
|
||||
#include "agg_rasterizer_outline.h"
|
||||
#include "agg_renderer_outline_image.h"
|
||||
|
||||
#include "symbolizer.hh"
|
||||
#include "line_aa.hh"
|
||||
#include "scanline_aa.hh"
|
||||
|
||||
namespace mapnik
|
||||
{
|
||||
|
||||
struct LineSymbolizer : public SymbolizerImpl
|
||||
{
|
||||
private:
|
||||
Color pen_;
|
||||
double width_;
|
||||
public:
|
||||
LineSymbolizer(const Color& pen,double width=1.0)
|
||||
: SymbolizerImpl(),
|
||||
pen_(pen),
|
||||
width_(width) {}
|
||||
|
||||
LineSymbolizer(const Color& pen,double minScale,double maxScale,double width=1.0)
|
||||
: SymbolizerImpl(minScale,maxScale),
|
||||
pen_(pen),
|
||||
width_(width) {}
|
||||
|
||||
void render(geometry_type& geom, Image32& image) const
|
||||
{
|
||||
typedef agg::renderer_base<agg::pixfmt_rgba32> ren_base;
|
||||
|
||||
if (width_ == 1.0)
|
||||
{
|
||||
//typedef agg::renderer_outline_aa<ren_base> renderer_oaa;
|
||||
//typedef agg::rasterizer_outline_aa<renderer_oaa> rasterizer_outline_aa;
|
||||
//agg::line_profile_aa prof;
|
||||
//prof.width(1.0);
|
||||
//renderer_oaa ren_oaa(ren_base, prof);
|
||||
//rasterizer_outline_aa ras_oaa(ren_oaa);
|
||||
|
||||
//ren_oaa.color(agg::rgba(r, g, b));
|
||||
//ras_oaa.add_path(geom);
|
||||
LineRasterizerAA<Image32> rasterizer(image);
|
||||
rasterizer.render<SHIFT0>(geom,pen_);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
typedef agg::renderer_base<agg::pixfmt_rgba32> ren_base;
|
||||
agg::row_ptr_cache<agg::int8u> buf(image.raw_data(),image.width(),image.height(),image.width()*4);
|
||||
agg::pixfmt_rgba32 pixf(buf);
|
||||
ren_base renb(pixf);
|
||||
|
||||
double r=pen_.red()/255.0;
|
||||
double g=pen_.green()/255.0;
|
||||
double b=pen_.blue()/255.0;
|
||||
|
||||
typedef agg::renderer_scanline_aa_solid<ren_base> renderer;
|
||||
renderer ren(renb);
|
||||
|
||||
|
||||
agg::rasterizer_scanline_aa<> ras;
|
||||
agg::scanline_p8 sl;
|
||||
|
||||
agg::conv_adaptor_vcgen<geometry<vertex2d,vertex_vector>,
|
||||
agg::vcgen_stroke,agg::null_markers> stroke(geom);
|
||||
stroke.generator().line_join(agg::round_join);
|
||||
stroke.generator().line_cap(agg::round_cap);
|
||||
stroke.generator().miter_limit(2.0);
|
||||
stroke.generator().width(width_);
|
||||
|
||||
//ScanlineRasterizerAA<Image32> rasterizer(image);
|
||||
ras.add_path(stroke);
|
||||
//rasterizer.render<agg::conv_adaptor_vcgen<geometry<vertex2d,vertex_vector>,
|
||||
// agg::vcgen_stroke,agg::null_markers> >(stroke,pen_);
|
||||
ras.add_path(stroke);
|
||||
ren.color(agg::rgba(r, g, b));
|
||||
|
||||
agg::render_scanlines(ras, sl, ren);
|
||||
}
|
||||
|
||||
}
|
||||
private:
|
||||
LineSymbolizer(const LineSymbolizer&);
|
||||
LineSymbolizer& operator=(const LineSymbolizer&);
|
||||
};
|
||||
}
|
||||
|
||||
#endif //LINE_SYMBOLIZER_HH
|
189
include/line_symbolizer.hpp
Normal file
189
include/line_symbolizer.hpp
Normal file
|
@ -0,0 +1,189 @@
|
|||
/* This file is part of Mapnik (c++ mapping toolkit)
|
||||
* Copyright (C) 2005 Artem Pavlenko
|
||||
*
|
||||
* Mapnik is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
//$Id: line_symbolizer.hpp 39 2005-04-10 20:39:53Z pavlenko $
|
||||
|
||||
#ifndef LINE_SYMBOLIZER_HPP
|
||||
#define LINE_SYMBOLIZER_HPP
|
||||
|
||||
#include "agg_basics.h"
|
||||
#include "agg_rendering_buffer.h"
|
||||
#include "agg_rasterizer_scanline_aa.h"
|
||||
#include "agg_conv_stroke.h"
|
||||
#include "agg_conv_curve.h"
|
||||
#include "agg_conv_dash.h"
|
||||
#include "agg_conv_contour.h"
|
||||
#include "agg_conv_stroke.h"
|
||||
#include "agg_vcgen_stroke.h"
|
||||
#include "agg_conv_adaptor_vcgen.h"
|
||||
#include "agg_conv_smooth_poly1.h"
|
||||
#include "agg_conv_marker.h"
|
||||
#include "agg_arrowhead.h"
|
||||
#include "agg_vcgen_markers_term.h"
|
||||
#include "agg_scanline_p.h"
|
||||
#include "agg_scanline_u.h"
|
||||
#include "agg_renderer_scanline.h"
|
||||
#include "agg_pixfmt_rgba.h"
|
||||
#include "agg_path_storage.h"
|
||||
#include "agg_renderer_outline_aa.h"
|
||||
#include "agg_rasterizer_outline_aa.h"
|
||||
#include "agg_rasterizer_outline.h"
|
||||
#include "agg_renderer_outline_image.h"
|
||||
|
||||
#include "symbolizer.hpp"
|
||||
#include "stroke.hpp"
|
||||
#include "line_aa.hpp"
|
||||
#include "scanline_aa.hpp"
|
||||
|
||||
namespace mapnik
|
||||
{
|
||||
struct line_symbolizer : public symbolizer
|
||||
{
|
||||
private:
|
||||
stroke stroke_;
|
||||
public:
|
||||
|
||||
line_symbolizer(stroke const& stroke)
|
||||
: symbolizer(),
|
||||
stroke_(stroke) {}
|
||||
|
||||
line_symbolizer(const Color& pen,float width=1.0)
|
||||
: symbolizer(),
|
||||
stroke_(pen,width) {}
|
||||
|
||||
void render(geometry_type& geom, Image32& image) const
|
||||
{
|
||||
typedef agg::renderer_base<agg::pixfmt_rgba32> ren_base;
|
||||
agg::row_ptr_cache<agg::int8u> buf(image.raw_data(),image.width(),image.height(),
|
||||
image.width()*4);
|
||||
agg::pixfmt_rgba32 pixf(buf);
|
||||
ren_base renb(pixf);
|
||||
|
||||
Color const& col = stroke_.get_color();
|
||||
double r=col.red()/255.0;
|
||||
double g=col.green()/255.0;
|
||||
double b=col.blue()/255.0;
|
||||
|
||||
if (0) //stroke_.width() == 1.0)
|
||||
{
|
||||
typedef agg::renderer_outline_aa<ren_base> renderer_oaa;
|
||||
typedef agg::rasterizer_outline_aa<renderer_oaa> rasterizer_outline_aa;
|
||||
agg::line_profile_aa prof;
|
||||
prof.width(stroke_.get_width());
|
||||
renderer_oaa ren_oaa(renb, prof);
|
||||
rasterizer_outline_aa ras_oaa(ren_oaa);
|
||||
|
||||
ren_oaa.color(agg::rgba(r, g, b, stroke_.get_opacity()));
|
||||
ras_oaa.add_path(geom);
|
||||
|
||||
|
||||
//LineRasterizerAA<Image32> rasterizer(image);
|
||||
//rasterizer.render<SHIFT0>(geom,stroke_.get_color());
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
//typedef agg::renderer_base<agg::pixfmt_rgba32> ren_base;
|
||||
|
||||
typedef agg::renderer_scanline_aa_solid<ren_base> renderer;
|
||||
renderer ren(renb);
|
||||
|
||||
agg::rasterizer_scanline_aa<> ras;
|
||||
agg::scanline_u8 sl;
|
||||
|
||||
if (stroke_.has_dash())
|
||||
{
|
||||
|
||||
agg::conv_dash<geometry<vertex2d,vertex_vector> > dash(geom);
|
||||
dash_array const& d = stroke_.get_dash_array();
|
||||
dash_array::const_iterator itr = d.begin();
|
||||
dash_array::const_iterator end = d.end();
|
||||
while (itr != end)
|
||||
{
|
||||
dash.add_dash(itr->first, itr->second);
|
||||
++itr;
|
||||
}
|
||||
agg::conv_stroke<agg::conv_dash<geometry<vertex2d,vertex_vector> > > stroke(dash);
|
||||
|
||||
line_join_e join=stroke_.get_line_join();
|
||||
if ( join == MITER_JOIN)
|
||||
stroke.generator().line_join(agg::miter_join);
|
||||
else if( join == MITER_REVERT_JOIN)
|
||||
stroke.generator().line_join(agg::miter_join);
|
||||
else if( join == ROUND_JOIN)
|
||||
stroke.generator().line_join(agg::round_join);
|
||||
else
|
||||
stroke.generator().line_join(agg::bevel_join);
|
||||
|
||||
line_cap_e cap=stroke_.get_line_cap();
|
||||
if (cap == BUTT_CAP)
|
||||
stroke.generator().line_cap(agg::butt_cap);
|
||||
else if (cap == SQUARE_CAP)
|
||||
stroke.generator().line_cap(agg::square_cap);
|
||||
else
|
||||
stroke.generator().line_cap(agg::round_cap);
|
||||
|
||||
stroke.generator().miter_limit(4.0);
|
||||
stroke.generator().width(stroke_.get_width());
|
||||
|
||||
ras.clip_box(0,0,image.width(),image.height());
|
||||
ras.add_path(stroke);
|
||||
ren.color(agg::rgba(r, g, b, stroke_.get_opacity()));
|
||||
agg::render_scanlines(ras, sl, ren);
|
||||
}
|
||||
else
|
||||
{
|
||||
agg::conv_stroke<geometry<vertex2d,vertex_vector> > stroke(geom);
|
||||
|
||||
line_join_e join=stroke_.get_line_join();
|
||||
if ( join == MITER_JOIN)
|
||||
stroke.generator().line_join(agg::miter_join);
|
||||
else if( join == MITER_REVERT_JOIN)
|
||||
stroke.generator().line_join(agg::miter_join);
|
||||
else if( join == ROUND_JOIN)
|
||||
stroke.generator().line_join(agg::round_join);
|
||||
else
|
||||
stroke.generator().line_join(agg::bevel_join);
|
||||
|
||||
line_cap_e cap=stroke_.get_line_cap();
|
||||
if (cap == BUTT_CAP)
|
||||
stroke.generator().line_cap(agg::butt_cap);
|
||||
else if (cap == SQUARE_CAP)
|
||||
stroke.generator().line_cap(agg::square_cap);
|
||||
else
|
||||
stroke.generator().line_cap(agg::round_cap);
|
||||
|
||||
stroke.generator().miter_limit(4.0);
|
||||
stroke.generator().width(stroke_.get_width());
|
||||
|
||||
ras.clip_box(0,0,image.width(),image.height());
|
||||
ras.add_path(stroke);
|
||||
ren.color(agg::rgba(r, g, b, stroke_.get_opacity()));
|
||||
agg::render_scanlines(ras, sl, ren);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
private:
|
||||
line_symbolizer(const line_symbolizer&);
|
||||
line_symbolizer& operator=(const line_symbolizer&);
|
||||
};
|
||||
}
|
||||
|
||||
#endif //LINE_SYMBOLIZER_HPP
|
|
@ -18,10 +18,10 @@
|
|||
|
||||
//$Id$
|
||||
|
||||
#ifndef LOCAL_DATASOURCE_HH
|
||||
#define LOCAL_DATASOURCE_HH
|
||||
#ifndef LOCAL_DATASOURCE_HPP
|
||||
#define LOCAL_DATASOURCE_HPP
|
||||
|
||||
#include "mapnik.hh"
|
||||
#include "mapnik.hpp"
|
||||
#include <vector>
|
||||
|
||||
namespace mapnik
|
||||
|
@ -44,4 +44,4 @@ namespace mapnik
|
|||
*/
|
||||
}
|
||||
|
||||
#endif //LOCAL_DATASOURCE_HH
|
||||
#endif //LOCAL_DATASOURCE_HPP
|
|
@ -18,10 +18,10 @@
|
|||
|
||||
//$Id$
|
||||
|
||||
#ifndef LOGICAL_HH
|
||||
#define LOGICAL_HH
|
||||
#ifndef LOGICAL_HPP
|
||||
#define LOGICAL_HPP
|
||||
|
||||
#include "filter.hh"
|
||||
#include "filter.hpp"
|
||||
|
||||
namespace mapnik
|
||||
{
|
||||
|
@ -44,7 +44,11 @@ namespace mapnik
|
|||
return (filter1_->pass(feature) &&
|
||||
filter2_->pass(feature));
|
||||
}
|
||||
|
||||
std::string to_string() const
|
||||
{
|
||||
return "("+filter1_->to_string()+" and "+filter2_->to_string()+")";
|
||||
}
|
||||
|
||||
filter<FeatureT>* clone() const
|
||||
{
|
||||
return new logical_and(*this);
|
||||
|
@ -104,7 +108,10 @@ namespace mapnik
|
|||
filter2_->accept(v);
|
||||
v.visit(*this);
|
||||
}
|
||||
|
||||
std::string to_string() const
|
||||
{
|
||||
return "("+filter1_->to_string()+" or "+filter2_->to_string()+")";
|
||||
}
|
||||
virtual ~logical_or()
|
||||
{
|
||||
delete filter1_;
|
||||
|
@ -145,7 +152,11 @@ namespace mapnik
|
|||
filter_->accept(v);
|
||||
v.visit(*this);
|
||||
}
|
||||
|
||||
std::string to_string() const
|
||||
{
|
||||
return "not ("+filter_->to_string()+")";
|
||||
}
|
||||
|
||||
~logical_not()
|
||||
{
|
||||
delete filter_;
|
||||
|
@ -155,4 +166,4 @@ namespace mapnik
|
|||
};
|
||||
}
|
||||
|
||||
#endif //LOGICAL_HH
|
||||
#endif //LOGICAL_HPP
|
|
@ -16,10 +16,10 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
//$Id$
|
||||
//$Id: map.hpp 39 2005-04-10 20:39:53Z pavlenko $
|
||||
|
||||
#ifndef MAP_HH
|
||||
#define MAP_HH
|
||||
#ifndef MAP_HPP
|
||||
#define MAP_HPP
|
||||
|
||||
namespace mapnik
|
||||
{
|
||||
|
@ -61,4 +61,4 @@ namespace mapnik
|
|||
void fixAspectRatio();
|
||||
};
|
||||
}
|
||||
#endif //MAP_HH
|
||||
#endif //MAP_HPP
|
|
@ -1,70 +0,0 @@
|
|||
/* This file is part of Mapnik (c++ mapping toolkit)
|
||||
* Copyright (C) 2005 Artem Pavlenko
|
||||
*
|
||||
* Mapnik is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
//$Id$
|
||||
|
||||
#ifndef MAPNIK_HH
|
||||
#define MAPNIK_HH
|
||||
|
||||
#include <config.hh>
|
||||
|
||||
#include <map>
|
||||
#include <vector>
|
||||
#include <cassert>
|
||||
#include "ptr.hh"
|
||||
#include "factory.hh"
|
||||
#include "filter.hh"
|
||||
#include "query.hh"
|
||||
#include "rule.hh"
|
||||
#include "spatial.hh"
|
||||
#include "logical.hh"
|
||||
#include "comparison.hh"
|
||||
#include "utils.hh"
|
||||
#include "style.hh"
|
||||
#include "symbolizer.hh"
|
||||
#include "style_cache.hh"
|
||||
#include "geometry.hh"
|
||||
#include "geom_util.hh"
|
||||
#include "raster.hh"
|
||||
#include "feature.hh"
|
||||
#include "attribute.hh"
|
||||
#include "attribute_collector.hh"
|
||||
#include "render.hh"
|
||||
#include "graphics.hh"
|
||||
#include "image_reader.hh"
|
||||
#include "image_util.hh"
|
||||
#include "datasource.hh"
|
||||
#include "layer.hh"
|
||||
#include "datasource_cache.hh"
|
||||
#include "wkb.hh"
|
||||
#include "map.hh"
|
||||
#include "colorcube.hh"
|
||||
#include "feature_type_style.hh"
|
||||
#include "filter_visitor.hh"
|
||||
#include "math_expr.hh"
|
||||
#include "value.hh"
|
||||
#include "expression.hh"
|
||||
#include "filter_parser.hh"
|
||||
#include "filter_factory.hh"
|
||||
|
||||
namespace mapnik
|
||||
{
|
||||
//typedef geometry_type geometry_type;
|
||||
}
|
||||
|
||||
#endif //MAPNIK_HH
|
76
include/mapnik.hpp
Normal file
76
include/mapnik.hpp
Normal file
|
@ -0,0 +1,76 @@
|
|||
/* This file is part of Mapnik (c++ mapping toolkit)
|
||||
* Copyright (C) 2005 Artem Pavlenko
|
||||
*
|
||||
* Mapnik is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
//$Id: mapnik.hpp 39 2005-04-10 20:39:53Z pavlenko $
|
||||
|
||||
#ifndef MAPNIK_HPP
|
||||
#define MAPNIK_HPP
|
||||
|
||||
#include <map>
|
||||
#include <vector>
|
||||
#include <cassert>
|
||||
#include "ptr.hpp"
|
||||
#include "factory.hpp"
|
||||
#include "filter.hpp"
|
||||
#include "query.hpp"
|
||||
#include "rule.hpp"
|
||||
#include "spatial.hpp"
|
||||
#include "logical.hpp"
|
||||
#include "comparison.hpp"
|
||||
#include "regex_filter.hpp"
|
||||
#include "utils.hpp"
|
||||
#include "style.hpp"
|
||||
#include "symbolizer.hpp"
|
||||
#include "style_cache.hpp"
|
||||
#include "geometry.hpp"
|
||||
#include "geom_util.hpp"
|
||||
#include "raster.hpp"
|
||||
#include "feature.hpp"
|
||||
#include "attribute.hpp"
|
||||
#include "attribute_collector.hpp"
|
||||
#include "render.hpp"
|
||||
#include "graphics.hpp"
|
||||
#include "image_reader.hpp"
|
||||
#include "line_symbolizer.hpp"
|
||||
#include "polygon_symbolizer.hpp"
|
||||
//#include "image_symbolizer.hpp"
|
||||
#include "image_util.hpp"
|
||||
#include "datasource.hpp"
|
||||
#include "layer.hpp"
|
||||
#include "datasource_cache.hpp"
|
||||
#include "wkb.hpp"
|
||||
#include "map.hpp"
|
||||
#include "colorcube.hpp"
|
||||
#include "feature_type_style.hpp"
|
||||
#include "math_expr.hpp"
|
||||
#include "value.hpp"
|
||||
#include "expression.hpp"
|
||||
#include "filter_visitor.hpp"
|
||||
#include "filter_parser.hpp"
|
||||
#include "filter_factory.hpp"
|
||||
#include "text_symbolizer.hpp"
|
||||
#include "label_placement.hpp"
|
||||
|
||||
#include "feature_layer_desc.hpp"
|
||||
|
||||
namespace mapnik
|
||||
{
|
||||
//typedef geometry_type geometry_type;
|
||||
}
|
||||
|
||||
#endif //MAPNIK_HPP
|
|
@ -18,10 +18,10 @@
|
|||
|
||||
//$Id$
|
||||
|
||||
#ifndef MATH_EXPR_HH
|
||||
#define MATH_EXPR_HH
|
||||
#ifndef MATH_EXPR_HPP
|
||||
#define MATH_EXPR_HPP
|
||||
|
||||
#include "expression.hh"
|
||||
#include "expression.hpp"
|
||||
|
||||
namespace mapnik
|
||||
{
|
||||
|
@ -32,6 +32,10 @@ namespace mapnik
|
|||
{
|
||||
return left + right;
|
||||
}
|
||||
static std::string to_string()
|
||||
{
|
||||
return "+";
|
||||
}
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
|
@ -41,6 +45,10 @@ namespace mapnik
|
|||
{
|
||||
return left - right;
|
||||
}
|
||||
static std::string to_string()
|
||||
{
|
||||
return "-";
|
||||
}
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
|
@ -50,6 +58,10 @@ namespace mapnik
|
|||
{
|
||||
return left * right;
|
||||
}
|
||||
static std::string to_string()
|
||||
{
|
||||
return "*";
|
||||
}
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
|
@ -59,6 +71,10 @@ namespace mapnik
|
|||
{
|
||||
return left / right;
|
||||
}
|
||||
static std::string to_string()
|
||||
{
|
||||
return "/";
|
||||
}
|
||||
};
|
||||
|
||||
template <typename FeatureT,typename Op>
|
||||
|
@ -90,6 +106,10 @@ namespace mapnik
|
|||
{
|
||||
return new math_expr_b<FeatureT,Op>(*this);
|
||||
}
|
||||
std::string to_string() const
|
||||
{
|
||||
return "("+left_->to_string() + Op::to_string() + right_->to_string()+")";
|
||||
}
|
||||
|
||||
~math_expr_b()
|
||||
{
|
|
@ -16,10 +16,10 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
//$Id$
|
||||
//$Id: memory.hpp 39 2005-04-10 20:39:53Z pavlenko $
|
||||
|
||||
#ifndef MEMORY_HH
|
||||
#define MEMORY_HH
|
||||
#ifndef MEMORY_HPP
|
||||
#define MEMORY_HPP
|
||||
|
||||
#include <iostream>
|
||||
#include <cassert>
|
||||
|
@ -82,4 +82,4 @@ namespace mapnik
|
|||
};
|
||||
|
||||
}
|
||||
#endif //MEMORY_HH
|
||||
#endif //MEMORY_HPP
|
|
@ -16,10 +16,10 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
//$Id$
|
||||
//$Id: params.hpp 39 2005-04-10 20:39:53Z pavlenko $
|
||||
|
||||
#ifndef PARAMS_HH
|
||||
#define PARAMS_HH
|
||||
#ifndef PARAMS_HPP
|
||||
#define PARAMS_HPP
|
||||
|
||||
#include <map>
|
||||
|
||||
|
@ -44,4 +44,4 @@ namespace mapnik
|
|||
virtual ~Parameters();
|
||||
};
|
||||
}
|
||||
#endif //PARAMS_HH
|
||||
#endif //PARAMS_HPP
|
|
@ -1,44 +0,0 @@
|
|||
/* This file is part of Mapnik (c++ mapping toolkit)
|
||||
* Copyright (C) 2005 Artem Pavlenko
|
||||
*
|
||||
* Mapnik is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
//$Id$
|
||||
|
||||
#ifndef PLUGIN_HH
|
||||
#define PLUGIN_HH
|
||||
|
||||
#include <ltdl.h>
|
||||
#include <string>
|
||||
|
||||
namespace mapnik
|
||||
{
|
||||
class PluginInfo
|
||||
{
|
||||
private:
|
||||
lt_dlhandle module_;
|
||||
std::string name_;
|
||||
public:
|
||||
PluginInfo (const std::string& name,const lt_dlhandle module);
|
||||
~PluginInfo();
|
||||
const std::string& name() const;
|
||||
lt_dlhandle handle() const;
|
||||
private:
|
||||
PluginInfo(const PluginInfo&);
|
||||
PluginInfo& operator=(const PluginInfo&);
|
||||
};
|
||||
}
|
||||
#endif //PLUGIN_HH
|
46
include/plugin.hpp
Normal file
46
include/plugin.hpp
Normal file
|
@ -0,0 +1,46 @@
|
|||
/* This file is part of Mapnik (c++ mapping toolkit)
|
||||
* Copyright (C) 2005 Artem Pavlenko
|
||||
*
|
||||
* Mapnik is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
//$Id: plugin.hpp 39 2005-04-10 20:39:53Z pavlenko $
|
||||
|
||||
#ifndef PLUGIN_HPP
|
||||
#define PLUGIN_HPP
|
||||
|
||||
#include <ltdl.h>
|
||||
#include <string>
|
||||
|
||||
namespace mapnik
|
||||
{
|
||||
class PluginInfo
|
||||
{
|
||||
private:
|
||||
std::string name_;
|
||||
lt_dlhandle module_;
|
||||
|
||||
public:
|
||||
PluginInfo (const std::string& name,const lt_dlhandle module);
|
||||
~PluginInfo();
|
||||
const std::string& name() const;
|
||||
lt_dlhandle handle() const;
|
||||
private:
|
||||
PluginInfo(const PluginInfo&);
|
||||
PluginInfo& operator=(const PluginInfo&);
|
||||
};
|
||||
}
|
||||
|
||||
#endif //PLUGIN_HPP
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue