243 | | 1. download http://sourceforge.net/projects/cunit/files/CUnit/CUnit-2.1-0-winlib.zip |
244 | | 2. extract and copy contents to C:\MingW |
245 | | |
246 | | '''13. Compiling libxml2 '''[[BR]] |
247 | | This is only needed for PostGIS 1.5+. Libxml2 is used to support the ST_GeomFromGML function. |
248 | | a. Download the libxml2 from ftp://xmlsoft.org/libxml2/libxml2-sources-2.7.6.tar.gz |
249 | | |
250 | | |
251 | | b. extract this libxml2-sources-2.7.6.tar.gz |
252 | | c. (note sure if win32/configure.js is needed was able to do without it). tried it -- it didn't seem to do anything but then configure worked fine afterward. |
253 | | |
254 | | d. ./configure |
255 | | e. make && make install |
256 | | |
257 | | '''14. Compiling PostGIS SVN 1.4 (without shp2pgql-gui)''' (if you want to install with the GUI you need GTK [UsersWikiWinCompileWithgui Install GTK and PostGIS 1.4 with GUI]) |
258 | | 1. Download postgis.refractions.net/download/postgis-1.4.0.tar.gz and put in C:/thesrc |
259 | | 2. ''cd /c/thesrc'' |
260 | | 3. ''gzip -d -c postgis-1.4.0.tar.gz | tar xvf -'' |
261 | | 4. ''cd postgis-1.4.0'' |
262 | | 5. ''configure --prefix=/c/postgresql --with-pgconfig=/c/postgresql/bin/pg_config --with-geosconfig=/c/postgresql/bin/geos-config --with-projdir=/c/postgresql'' |
263 | | 6. export PATH"/c/postgres/bin:$PATH" |
264 | | 7. ''make clean && make'' |
265 | | (if you run into problems -- To pipe output to file do for further analysis |
266 | | make 2>&1 | tee /c/build.log) |
267 | | 8. ''make install'' |
268 | | 9. ''make check'' [UsersWikiMakeCheckConsiderations Make Check gotchas] |
269 | | |
270 | | '''15. To use your new postgis''' |
271 | | 1. copy postgis-1.4.dll from C:\postgresql\lib to your windows PostgreSQL lib folder |
272 | | 2. copy C:\postgresql\bin\libgeos-3-1-1.dll,libgeos_c-1.dll, libproj.dll, libiconv-2.dll (depending on which version it could be libiconv-2.dll or libiconv2.dll), shp2pgsql.exe, pgsql2shp.exe to your PostgreSQL bin folder |
273 | | 3. copy the proj datum shift files to share/contrib/postgis/proj |
274 | | 4. open PGAdmin and make a new database without any template |
275 | | 5. open a new query-window to your new database |
276 | | 6. run postgis.sql and spatial_ref_sys.sql from C:\postgresql\share\contrib\ |
| 243 | 1. Download http://sourceforge.net/projects/cunit/files/CUnit/CUnit-2.1-0-winlib.zip |
| 244 | 2. Extract and copy contents to C:\MinGW |
| 245 | |
| 246 | == 13. Compiling libxml2 == |
| 247 | |
| 248 | This is only needed for PostGIS 1.5+. Libxml2 is used to support the ST_GeomFromGML function. Download ftp://xmlsoft.org/libxml2/libxml2-sources-2.7.6.tar.gz |
| 249 | {{{ |
| 250 | # tar xvfz libxml2-sources-2.7.6.tar.gz |
| 251 | # ./configure |
| 252 | # make |
| 253 | # make install |
| 254 | }}} |
| 255 | |
| 256 | == 14. Compiling PostGIS == |
| 257 | |
| 258 | === PostGIS 1.4 === |
| 259 | |
| 260 | Download http://postgis.refractions.net/download/postgis-1.4.1.tar.gz and put in C:/thesrc |
| 261 | {{{ |
| 262 | # tar xvfz postgis-1.4.1.tar.gz |
| 263 | # cd postgis-1.4.1 |
| 264 | # ./configure \ |
| 265 | --prefix=/c/postgresql \ |
| 266 | --with-pgconfig=/c/postgresql/bin/pg_config \ |
| 267 | --with-geosconfig=/c/postgresql/bin/geos-config \ |
| 268 | --with-projdir=/c/postgresql |
| 269 | # export PATH=/c/postgres/bin:$PATH |
| 270 | # make clean |
| 271 | # make |
| 272 | # make install |
| 273 | # make check |
| 274 | |
| 275 | If you run into problems with your build, pipe the output into a file for further analysis. |
| 276 | {{{ |
| 277 | # make 2>&1 | tee /c/build.log |
| 278 | }}} |
| 279 | |
| 280 | == PostGIS 1.5 === |
| 281 | |
| 282 | More to come here. |
| 283 | |
| 284 | === Installing into PostgreSQL === |
| 285 | |
| 286 | 1. Copy the following files into your Windows PostgreSQL lib folder |
| 287 | * C:\postgresql\lib\postgis-1.4.dll |
| 288 | 2. Copy the following files into your Windows PostgreSQL bin folder. |
| 289 | * C:\postgresql\bin\libgeos-3-1-1.dll |
| 290 | * C:\postgresql\bin\libgeos_c-1.dll |
| 291 | * C:\postgresql\bin\libproj.dll, |
| 292 | * C:\postgresql\bin\libiconv-2.dll |
| 293 | * C:\postgresql\bin\shp2pgsql.exe |
| 294 | * C:\postgresql\bin\pgsql2shp.exe |
| 295 | 3. Copy the proj datum shift files to the PostgreSQL share/contrib/postgis/proj |
| 296 | 4. Open PGAdmin and make a new database without any template |
| 297 | 5. Open a new query-window to your new database |
| 298 | 6. Run postgis.sql and spatial_ref_sys.sql from C:\postgresql\share\contrib\ |