liste

Bonjour et bienvenue dans mon site ! Willkommen auf meiner Seite! welcome in my homepage! http://assistance-en-sig.blogspot.com/ SIG ; Bases de données ; Géomatique; Python; ArcGIS; QGIS;

recherche

Showing posts with label PostGIS. Show all posts
Showing posts with label PostGIS. Show all posts

Friday, September 20, 2013

Tutorial: How to Connect GeoServer to PostGIS Spatial Datasets

This beginner GeoServer tutorial explains how to connect to PostGIS spatial datasets by setting up GeoServer stores and layers.  To complete this tutorial you should either have a PostgreSQL with PostGIS database server installed locally, or have the necessary connection information for a remotely hosted database server.  This tutorial also requires that you have pre-existing spatial datasets contained within your PostGIS database.

If you do not have spatial data already in your PostGIS database, sample data can be downloaded here, to add the data to your database please complete our tutorial on ‘Importing Shapefile GIS Data into PostgreSQL’ using 4326 as the SRID. 

This tutorial was designed around locally installed PostgreSQL/PostGIS database servers, but for those individuals loading from remotely hosted servers should replace ‘localhost’ with the necessary host information.  To start off we will need to login to the GeoServer Web Admin Interface which is located athttp://localhost:8080/geoserver/web.  Enter the proper username and password to access the internal administrator menu options.

Setting up a GeoServer PostGIS Store


On the left hand side under the Data menu, click on the Stores link.  This should bring up a list of all the existing stores which are providing data to your GeoServer.

Click on Add new Store, and then select PostGIS – PostGIS Database.  For this tutorial we will be adding our store to the existing Workspace called cite, select cite in the Workspace* drop-down menu.  For Data Source Name* enter ‘PostGIS_Dataset’.  Optionally you can enter a description of the Store, such as ‘PostGIS spatial datasets’.  Leave the checkbox next to Enabled.

Now continuing on to the Connection Parameters section.  Leave dbtype* set to ‘postgis’, host* ‘localhost’ and port* ‘5432’.  Note: if your server is configured to run on a different port then update accordingly.  Next, enter the name of your PostGIS enabled database.  You can leave schema set to ‘public’ unless your server is configured differently.  For username enter ‘postgres’ and provide the postgres user password in the passwd field.  The remainder of the settings can be left as default.  Scroll down to the bottom and click Save if all settings look appropriate.

Setting up a GeoServer PostGIS Layer


After clicking the save button on your new GeoServer Store, it will take you to the New Layer chooser menu which should display a list of your PostGIS spatial datasets.  This list is composed of tables which contain the geometry data type that also have a reference entry within the PostGIS system table named ‘geometry_columns’.  If for some reason your spatial table does not contain a reference in the geometry_columns table, you will have to manually add it before it will become available for publishing under GeoServer.
INSERT INTO geometry_columns(f_table_catalog, f_table_schema, f_table_name, f_geometry_column, coord_dimension, srid, "type")
SELECT '', 'public', 'tablename', 'the_geom', ST_CoordDim(the_geom), ST_SRID(the_geom), GeometryType(the_geom)
FROM public.tablename LIMIT 1;
Note: replace ‘tablename’ and ‘the_geom’ with the correct name of your existing spatial table and spatial data column name.

Scroll through the list of Layer names and when you’ve found the Layer you wish to setup, click the Publish button.

The most important information for GeoServer Layer setup is store in the Coordinate Reference Systems section.  If your layer has a blank value under Native SRS, you will have to define your projection manually by clicking the Find button next to Declared SRS.  For global data using the WGS 84 projection with code 4326 is recommended.  For more localized datasets you must browse through the list of supported projections to find the one that is correct for your dataset.  Once you have found the correct projection in the list, add it to the Declared SRS by clicking on the code number.  You should now see a value such as EPSG:4326.

Now that the Coordinate Reference System has been defined we need to define the bounds or spatial extent of your dataset.  Scroll down to the Bounding Boxes section and click the Compute from data button underneath Native Bounding Box.  Then scroll down further and click the Compute from native bounds button found underneath Lat/Lon Bounding Box.  If you set your Declared SRS to EPSG:4326 then these values will appear to be the same because the WGS 84 projection is notated using Latitude and Longitude coordinates.  Scroll down and click the Save button to save your PostGIS GeoServer Layer settings.  This should take you back to the list of all Layers published by your GeoServer, you should see your new PostGIS layer as follows:

Workspace
Store
Layer Name
Enabled?
Native SRS
cite
PostGIS_Dataset
layer
checked
EPSG: 4326

To confirm that your new PostGIS Layer is working properly, click the Layer Preview on the left hand side of the GeoServer Web Admin Interface Menu.  Scroll through your list of publish layers to find your new PostGIS Layer, and preview it using OpenLayers.  Pan and zoom into North America, if everything was a success it should look like the image below.
geoserver_postgis_layer
Your new PostGIS Layer is now published and ready for use within future web mapping applications such as OpenLayers.  Users should now have a greater understanding of how to setup a GeoServer PostGIS Store as well as how to publish their own spatial datasets stored within a PostgreSQL/PostGIS database.

Tuesday, May 14, 2013

Oracle Spatial Tutorial


Getting Started With Oracle Spatial
Oracle Spatial 10 G Platform Positioning Oracle10 G Spatial Spatial Data Server Oracle Application Server 10 G Oracle Location Technology Oracle Core Technologies Middle Tier Map
http://download.oracle.com/otndocs/products/spatial/pdf/au_melbourne06_start.pdf
Oracle Database Semantic Technologies Tutorial
Oracle Database Semantic Data Store A Feature Of Oracle Spatial 11g Option For Oracle Database 11g Enterprise Edition Requires Partitioning And Advanced
http://download.oracle.com/otndocs/tech/semantic_web/pdf/oradb_semtech_tutorial.pdf
Integrating Maps In Oracle Business Intelligence Enterprise Edition
This Document Is Not A Tutorial On Those Technologies But Is A Cookbook On One Oracle Spatial & Locator Oracle Spatial And Oracle Locator Make Location A Native Type
http://www.oracle.com/technetwork/middleware/mapviewer/mapviewer-obiee-129557.pdf
Oracle Spatial 10 G
Oracle Spatial 10 G Introduction Oracle Spatial, An Option For Oracle Database 10g Enterprise Edition, Includes Advanced Spatial Capabilities To Support Gis
http://www.oracle.com/technetwork/database/enterprise-edition/spatial-twp-10gr2-131464.pdf
Building A Geographic Database In Oracle Spatial
Spatial Databases With Application To Gis, Morgan Kaufmann, 2001. M. Gertz. Oracle/sql Tutorial ( Chapter 1 Only) (posted Online ). Further Reading: H. Garcia-molina
http://www.dbnet.ece.ntua.gr/~stefanak/gdi_2007/HUA_mod4.pdf
Tutorial On Geographicand Spatialdatamining
Distance=2 Unit=mile') = 'true' Select All Competitors And Locations Within 2 Miles Distance From Bank With Id 1604 Example: Oracle Spatial 34 Michael May Tutorial Geographic
http://www.sebd.org/2007/images/May-Tutorial-SEBD-07.pdf
Oracle Maps Installation And Integration In Apex
Oracle Spatial Functionality Installed 3. Apex 2.2 4. Oracle Application Server 10.1 The Oc4j/mapviewer Is Shown: At The Bottom Of The Page You Will See: Oracle Maps Tutorial.
http://www.fischer-wasels.de/oracle/maps/Oracle_Maps_in_APEX_WP_US.pdf
An Introduction To Oracle Data Integrator
Odi Positioning Not A Replacement For Oracle Warehouse Builder-owb Has Oracle Cdc Subscriber Views, Work Area, Corrected Schemas Star Schemas, Olap, Spatial, Data
http://www.rittmanmead.com/files/An%20Introduction%20to%20Oracle%20Data%20Integrator.pdf
Tutorial
Oracle Spatial Miroslav Gregan Ei5b 1. Rsum Le Prsent Document Est Un Tutorial Pour La Gestion Des Donnes Spatiales Des Bases De Donnes Oracle.
http://www.iict.ch/Tcom/Presentations/EI2004/Oracle_Spatial_Tutorial.pdf
Tutorial: Using Sql Server Filestream To Store Blobs
Tutorial: Using Sql Server Filestream To Store . Blobs Balasubramanian Shanmugam . Introduction In The Earlier Versions Of Sql Server, Storing Unstructured Data Posed
http://www.infosys.com/microsoft/resource-center/documents/sqlserver-filestream-blobs.pdf
What's New In Arcgis 10
New Functionality In Arcmap Allows You To Define A Spatial Query Against Sql Spatial Parametric Circles And Ellipses Are Supported With The St_geometry Type In Oracle
http://help.arcgis.com/en/arcgisdesktop/10.0/pdf/whats_new_in_arcgis_10.pdf
Oracle10g For Developers: What You Need To Know
Oracle 10g For Developers: What You Need To Know Oracle10g For Developers: What Sdo_geometry, Rasterdatatable Varchar2(32), Rasterid Number, Metadata Xmltype);-oracle Spatial
http://nyoug.org/Presentations/2006/September_NYC_Metro_Meeting/200609King_Oracle%2010g%20for%20Developers.pdf
Oracle Database 11g Semantic Technologies
Geosparql: Handling Spatial Data In Rdf To Develop Best Practices For Managing Customer Needs / Oracle Value Propositions Requirement Oracle Value Proposition Oracle
http://semdata.org/sites/default/files/OracleLopezSemData.pdf
Postgis Wkt Raster. An Open Source Alternative To Oracle Georaster
Oracle Spatial Only Accept Sdo Format For Input Geometry Data. We Have To Convert Our 28 Credits Screenshots & Tutorial: Pierre Racine Evaluation Matrix: Damon Riga
http://2010.foss4g.org/presentations/3814.pdf
Course Design Document Is410: Advanced Data Management
The Third Hands-on Session Uses Pl/sql As A Platform And Requires The Students To Go Through A Web-based Tutorial That Introduces The Oracle Spatial Locator And Guides
http://www.sis.smu.edu.sg/programme/diagram/electives/IS410_AdvDM_course.pdf
Boston Gis: Tutorial Booklet
Oracle Locator And Oracle Spatial For Example Does Have An Sdo_nn And Sdo_nn_distance Boston Gis: Tutorial Booklet Postgis Nearest Neighbor: A Generic Solution - Much
http://www.bostongis.com/TutBook.aspx?OutputFormat=PDF
Oracle Database 10 G Enterprise Edition
Additional Support For Complex Spatial Data Can Be Added With The Oracle Spatial Option. Access To Data Stored Is Via Standard Interfaces Such As Sql, Jdbc, Sqlj, Odbc, Ole
http://www.net130.com/Class/oracle_tech_cp/ds_general_oracle_database10g_ee_0104.pdf
Boston Gis: Tutorial Booklet
We Will Assume A Windows Environment For This Tutorial, But Most Of The Tutorial Using Postgis For This Exercise, Most Spatial Relational Databases Such As Oracle Spatial
http://pelagis.net/gis_con/paper/TutBook%20GIS%20open%20source.pdf

Friday, November 23, 2012

Working with your PostGIS Layers using Quantum GIS (QGIS)

This tutorial will explain to the user how to connect QGIS to your PostgreSQL/PostGIS database and spatially view any of your tables containing a geometry column. PostGIS is a powerful database for GIS functions and data storage so it is nice to have a program to visually see the GIS data stored within the database.  QGIS is an easy to use open source GIS application and is ideal for data viewing, editing, and making maps.

Si vous trouvez ce document utile et interessant merci de faire un don en cliquant sur un lien publicitaire dans le cadre 

You are required to have a PostgreSQL database with PostGIS installed.  
To install PostGIS you can visit the following website 
This database will need a GIS table (contains a geometry type column). Follow the next few steps to import the shapefile to PostgreSQL using QGIS.

Importing Shapefile Data to PostGIS using QGIS

Open Quantum GIS and click the “Import Shapefiles to PostgreSQL" QGIS Import Shapefiles to PostgreSQL button. This will open SPIT (Shapefile to PostGIS Import Tool).

Start by creating a connection to your PostgreSQL database.  Under “PostgreSQL Connections” click the “New” button.  Add a name for your connection, and then enter the parameters for your database connection (Host, Database, Port, Username, and Password).  Click the “Test Connection” button and you should see a message saying “Connection to databasename was successful”.  Once this is successful, click OK.

QGIS PostGIS Connection

Select your server from the dropdown list and click “Connect”, a list of your schemas will appear in the Global schema dropdown menu.  Choose the schema where you would like to import the data. Now click the “Add” button and add your shapefile. Ensure the information is correct concerning the shapefile and click “OK”.

QGIS SPIT (Shapefile to PostGIS Import Tool)

Your shapefile is now added to your database. Next, we will view the newly added PostGIS data.

Viewing PostGIS Layers using QGIS

Click the “Add PostGIS Layer” button QGIS Add PostGIS Layer. This will open up a window.

Under “PostgreSQL Connections” select your server name from the dropdown list and click “Connect”.  You will see a list of your PostgreSQL schemas. Open the schema containing your GIS data to see a list of all available layers.  Select the n_america layer click “Add”.

QGIS Add PostGIS Table

The GIS data for North America will appear in the data viewing area. Use the “Zoom In” tool QGIS Zoom In to draw a box closely around the US, Canada, and Mexico.

QGIS Layer View

To view the attribute table for this layer, right-click the layer and choose “Open Attribute Table” or click the icon QGIS Open Attribute Table when the layer is selected.

To edit your data, turn on the editor by clicking the “Toggle Editing” icon QGIS Toggle Editing.  Save your edits using the “Save Edits” button QGIS Save Edits.

A simple way to identify features or query the attributes of a location is to use the “Identify Features” tool QGIS Identify Features. Click a location on the map to view its attributes.

Classifying your Data


Right-click the n_america layer and choose “Properties”. Under Symbology -> Legend Type, choose “Unique Value”. Under “Classification field”, choose “country” and click Classify. Each unique value in the country column will be given a random color. Click “OK”.

QGIS Symbology

Now let’s add some labels.  Select the n_america layer and click the “Labeling” button QGIS Labeling. Put a check next to “Label this layer”. Under “Field with labels”, choose “country” and click “OK”.

QGIS Map

This concludes our tutorial on working with PostGIS data with QGIS. The user should now know how to import shapefile data into a PostGIS database, load that layer in QGIS, view/edit the attributes, and symbolize the map according to its values.

If you find this tutorial useful please make a donation by clicking one of the ads (Adsense) thanks 

What Is PostGIS?


PostGIS is an open source, freely available, and fairly OGC compliant spatial database extender for the PostgreSQL Database Management System. In a nutshell it adds spatial functions such as distance, area, union, intersection, and specialty geometry data types to the database. PostGIS is very similar in functionality to SQL Server 2008 Spatial support, ESRI ArcSDE, Oracle Spatial, and DB2 spatial extender. The latest release version now comes packaged with the PostgreSQL DBMS installs as an optional add-on. As of this writing PostGIS 2.0.0 is the latest stable release.

Wednesday, November 7, 2012

Guide de l’utilisateur de PostgreSQL/PostGIS


I Installation sous Windows 1
1 Pré-requis 3
1.1 MinGW . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2 Msys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.3 Suppléments: Zlib, GetText, LibIconv,Bison, Flex,wget et MsysTDK . . . . . . . . . . . . . . . . . . . . . . . . 3
2 Compilation et Installation 5
2.1 Création des répertoires des sources et du répertoire de destination (facultatif) . . . . . . . . . . . . . . . . . . . 5
2.2 PostgreSQL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.2.1 Téléchargement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.2.2 Compilation et Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.2.3 Ajout des outils/supports contributifs pour PostgreSQL . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.3 Geos et Proj . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.3.1 Téléchargement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.3.2 Compilations et Installations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.3.3 Création de la DLL pour PROJ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.4 PostGIS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.4.1 Téléchargement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.4.2 Compilation et Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.5 Finalisation de la distribution, rendre sa distribution portable . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
2.6 Erreurs de compilations reportées par les utilisateurs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
2.6.1 Erreur de compilation pour PostgreSQL 8.2.1 et PostGIS 1.2.0 . . . . . . . . . . . . . . . . . . . . . . . 11
2.6.2 Erreur de libiconv . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.6.3 Erreur de compilation avec PostGIS pour pgsql2shp.exe . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.6.4 Erreur de PostGIS avec make . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

demander le document PDF http://assistance-en-sig.blogspot.com/
laisser SVP votre adresse mail


https://docs.google.com/open?id=0B2IpupSGSb08MTc4ekxOU19JSEk

Saturday, October 27, 2012

OpenGeoDa - Free Yourself


My ”learn python because you are a programmer” pissed off a couple people. Look, either embrace change or be replaced. The idea that you’ll sit at some desk, string together ArcGIS Toolbox wizards doesn’t end well. This only results in you getting paid minimum wage with no where to go. The reality of the world we are in is the only thing you have to separate yourself from the 7 billion other people in the world is your flexibility and skills. If you don’t stand out, you’ll be nothing but a chair moistener in sector 7g.
Now that doesn’t mean you can’t use ArcGIS, quite the contrary. It is still one of the best tools to do much GIS. But you need to augment your “Esri skillz” with other toolsets that will give you a leg up when you want to get out of the cul-de-sac.
I had beers with a new friend of mine last Friday and we were talking about how to expand your skillset in ways to benefit your professional growth. Of course I mentioned Python but she already knew that. Python is great because it is not disruptive at all and works well within the Esri silo. The other application I recommended to her was OpenGeoDa from Arizona State University.
GeoDa is a free software program that serves as an introduction to spatial data analysis. OpenGeoDa is the cross-platform, open source version that runs on different versions of Windows (including XP, Vista and 7), Mac OS, and Linux.
What does that bring to the table? Open source, cross-platform spatial data analysis. It is sexy just saying that. With 70,000 users, GeoDa is clearly established and will help you get a better understanding of what actual geospatial analysis is. Wizards only hide learning from you and cause you to be a button pusher. Esri likes this because it allows them to sell more ArcGIS licenses to anyone who can use a mouse, but it won’t make you more valuable.
Of course learning a database, PostGIS, etc can help as well as Brian Timoney points out. But tools such as OpenGeoDa can be integrated into your workflows easily and give you the skills to make yourself much more valuable to organizations. Much like Paul Ryan, you need exercise (in this case you skills, not your biceps) to keep your focus.
PaulRyan
My hangout with Nathaniel Kelso was very interesting because he talked about how Stamen was doing amazing visualization work for Facebook and others. That’s the future, not migrating the old way of doing things “to the cloud”. Onwards….

OpenGeoDa - Free Yourself


My ”learn python because you are a programmer” pissed off a couple people. Look, either embrace change or be replaced. The idea that you’ll sit at some desk, string together ArcGIS Toolbox wizards doesn’t end well. This only results in you getting paid minimum wage with no where to go. The reality of the world we are in is the only thing you have to separate yourself from the 7 billion other people in the world is your flexibility and skills. If you don’t stand out, you’ll be nothing but a chair moistener in sector 7g.
Now that doesn’t mean you can’t use ArcGIS, quite the contrary. It is still one of the best tools to do much GIS. But you need to augment your “Esri skillz” with other toolsets that will give you a leg up when you want to get out of the cul-de-sac.
I had beers with a new friend of mine last Friday and we were talking about how to expand your skillset in ways to benefit your professional growth. Of course I mentioned Python but she already knew that. Python is great because it is not disruptive at all and works well within the Esri silo. The other application I recommended to her was OpenGeoDa from Arizona State University.
GeoDa is a free software program that serves as an introduction to spatial data analysis. OpenGeoDa is the cross-platform, open source version that runs on different versions of Windows (including XP, Vista and 7), Mac OS, and Linux.
What does that bring to the table? Open source, cross-platform spatial data analysis. It is sexy just saying that. With 70,000 users, GeoDa is clearly established and will help you get a better understanding of what actual geospatial analysis is. Wizards only hide learning from you and cause you to be a button pusher. Esri likes this because it allows them to sell more ArcGIS licenses to anyone who can use a mouse, but it won’t make you more valuable.
Of course learning a database, PostGIS, etc can help as well as Brian Timoney points out. But tools such as OpenGeoDa can be integrated into your workflows easily and give you the skills to make yourself much more valuable to organizations. Much like Paul Ryan, you need exercise (in this case you skills, not your biceps) to keep your focus.
PaulRyan
My hangout with Nathaniel Kelso was very interesting because he talked about how Stamen was doing amazing visualization work for Facebook and others. That’s the future, not migrating the old way of doing things “to the cloud”. Onwards….

Saturday, October 13, 2012

Actualité SIG OpenSource


Sortie de QGIS 1.8




Depuis quelques jours, la version 1.8 est sortie !
Pour ceux qui serait passé à coté de ce petit bijou, QuantumGIS (QGIS pour les intimes) est un logiciel SIG capable de visualiser et traiter un grand nombre de données que ce soit du vecteur ou du raster. Il peut également se connecter aux bases de données spatiales et aux flux type WMS, WFS, etc. Il est également doté d'outil de saisie très complet et supporte la topologie (si si !)
Voici les améliorations apportées par cette nouvelle version 1.8 
Explorateur QGIS : un catalogue de données à l'image d'ArcCatalogue d'ESRI ou celui de MapInfo
DB Manager : Si vous connaissez PostGIS Manager, ce dernier y ressemble fortement avec un petit air de PGAdmin III. Vous pouvez donc glissez des couches depuis l'explorateur dans le gestionnaire pour importer vos données dans votre base spatialisée. Vous pouvez l'utiliser pour exécuter des requêtes SQL et visualiser les résultats dans l'application. Vous pouvez créer, éditer, supprimer, vider une table ou bien la déplacer dans un autre schéma.