Re: [mapserver-users] Re: Join from SHP file to PostgreSQL table

2010-11-29 Thread Brent Fraser

Flavio,

  I'm currently experimenting with joining a shapefile to a MS Access 
file using OGR and ODBC (and stock mapserver v 5.2.1 from MS4W).   Works ok:


CONNECTIONTYPE OGR
CONNECTION 'G:/GeoData/Parcels/Alberta/t_505033.shp'
DATA "SELECT * FROM t_505033 LEFT JOIN 'ODBC:Parcels_Rural'.basic 
ON t_505033.PID=basic.PID"


I'm able to use a column in the ODBC datasource as the CLASSITEM for 
rendering.  You should be able to do the same with an ODBC datasource 
pointing to a PostGIS database...


Best Regards,
Brent Fraser


On 11/29/2010 12:49 PM, Flavio Carmo wrote:

Hi,

Sorry, but i cant upload the shapes to postgres. The shapefiles are 
modified using arcview and the data in the postgres is modified using 
a custom desktop software that my client uses for about 5 years. The 
software open the shapefiles, then using a ODBC connection with 
postgres, make the join in memory and shows the information for each 
geometry.


I cant undo this situation, so, my client propose to me to uses a 
opensource solution to also make this join in a WMS service. He knows 
Geoserver and Mapserver. Geoserver cant do this too, so i've hoped 
that mapserver could be a solution.


Regards,

Flávio Carmo


On Mon, Nov 29, 2010 at 16:35, Stephen Woodbridge 
mailto:wood...@swoodbridge.com>> wrote:


On 11/29/2010 2:21 PM, flaviocarmo wrote:


Hi,

Thanks all for your responses. Im a novice in Mapserver so,
after reading,
now i know that:

- I cant use a JOIN to shown only geometrys with the CODE
field stored on
Postgres (or another Database) because joins cannot modify the
look of a
map;

- I need to use a template always to show the queries results;

- Case-sensitive fields can be a problem in a query with
mapserver;

- The "PG:" string for was my mistake. I missed in the mail,
but was in my
MAP file. Sorry.

Now what? There isnt a way to solve my issue? My client needs
a opensource
solution to deliver his data. His current solution (ESRI
ArcGIS Server) is
too expensive to buy another license, so he asked for a
solution with the
same quality, but opensource.

There is a way to workaround this?


Favlio,

I would put all the data in a postgres/postgis database and
display it from there. There is a simple shapefile loader:
 shp2pgsql. In this setup you can easily join tables, create
inherited tables if you are working with data like streets.shp for
multiple countries so the parent table can be used to seamlessly
display the multiple streets tables as a single layer in mapserver.

He may have to rethink his work flow a little because the tools
are different, but this would be the case regardless if he is
changing the software that he is using.

-Steve W

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org

http://lists.osgeo.org/mailman/listinfo/mapserver-users



___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


RE: [mapserver-users] Re: Join from SHP file to PostgreSQL table

2010-11-29 Thread Bob Basques
All, 

How about incrementally loading the SHAPE files at some predetermined
interval into POSTGIS is this feasible, are the data files to large,
etc? 

bobb 




>>> "Fawcett, David (MPCA)"  wrote:


Your client has some pretty custom requirements.  How current does the
data published by the Web server need to be?  Could it be refreshed
nightly or hourly, or do changes to the data have to be immediately
reflected in on the Web? 


  


From: 

mapserver-users-boun...@lists.osgeo.org
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Flavio
Carmo
Sent: Monday, November 29, 2010 1:49 PM
To: Stephen Woodbridge
Cc: mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] Re: Join from SHP file to PostgreSQL
table 

  

Hi, 

  

Sorry, but i cant upload the shapes to postgres. The shapefiles are
modified using arcview and the data in the postgres is modified using a
custom desktop software that my client uses for about 5 years. The
software open the shapefiles, then using a ODBC connection with
postgres, make the join in memory and shows the information for each
geometry. 

  

I cant undo this situation, so, my client propose to me to uses a
opensource solution to also make this join in a WMS service. He knows
Geoserver and Mapserver. Geoserver cant do this too, so i've hoped that
mapserver could be a solution. 

  

Regards, 


Flávio Carmo


On Mon, Nov 29, 2010 at 16:35, Stephen Woodbridge
 wrote: 

On 11/29/2010 2:21 PM, flaviocarmo wrote: 

Hi,

Thanks all for your responses. Im a novice in Mapserver so, after
reading,
now i know that:

- I cant use a JOIN to shown only geometrys with the CODE field stored
on
Postgres (or another Database) because joins cannot modify the look of a
map;

- I need to use a template always to show the queries results;

- Case-sensitive fields can be a problem in a query with mapserver;

- The "PG:" string for was my mistake. I missed in the mail, but was in
my
MAP file. Sorry.

Now what? There isnt a way to solve my issue? My client needs a
opensource
solution to deliver his data. His current solution (ESRI ArcGIS Server)
is
too expensive to buy another license, so he asked for a solution with
the
same quality, but opensource.

There is a way to workaround this? 
  

Favlio,

I would put all the data in a postgres/postgis database and display it
from there. There is a simple shapefile loader:  shp2pgsql. In this
setup you can easily join tables, create inherited tables if you are
working with data like streets.shp for multiple countries so the parent
table can be used to seamlessly display the multiple streets tables as a
single layer in mapserver.

He may have to rethink his work flow a little because the tools are
different, but this would be the case regardless if he is changing the
software that he is using.

-Steve W 


___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users 

  

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


RE: [mapserver-users] Re: Join from SHP file to PostgreSQL table

2010-11-29 Thread Fawcett, David (MPCA)
Your client has some pretty custom requirements.  How current does the data 
published by the Web server need to be?  Could it be refreshed nightly or 
hourly, or do changes to the data have to be immediately reflected in on the 
Web?

From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Flavio Carmo
Sent: Monday, November 29, 2010 1:49 PM
To: Stephen Woodbridge
Cc: mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] Re: Join from SHP file to PostgreSQL table

Hi,

Sorry, but i cant upload the shapes to postgres. The shapefiles are modified 
using arcview and the data in the postgres is modified using a custom desktop 
software that my client uses for about 5 years. The software open the 
shapefiles, then using a ODBC connection with postgres, make the join in memory 
and shows the information for each geometry.

I cant undo this situation, so, my client propose to me to uses a opensource 
solution to also make this join in a WMS service. He knows Geoserver and 
Mapserver. Geoserver cant do this too, so i've hoped that mapserver could be a 
solution.

Regards,

Flávio Carmo

On Mon, Nov 29, 2010 at 16:35, Stephen Woodbridge 
mailto:wood...@swoodbridge.com>> wrote:
On 11/29/2010 2:21 PM, flaviocarmo wrote:

Hi,

Thanks all for your responses. Im a novice in Mapserver so, after reading,
now i know that:

- I cant use a JOIN to shown only geometrys with the CODE field stored on
Postgres (or another Database) because joins cannot modify the look of a
map;

- I need to use a template always to show the queries results;

- Case-sensitive fields can be a problem in a query with mapserver;

- The "PG:" string for was my mistake. I missed in the mail, but was in my
MAP file. Sorry.

Now what? There isnt a way to solve my issue? My client needs a opensource
solution to deliver his data. His current solution (ESRI ArcGIS Server) is
too expensive to buy another license, so he asked for a solution with the
same quality, but opensource.

There is a way to workaround this?

Favlio,

I would put all the data in a postgres/postgis database and display it from 
there. There is a simple shapefile loader:  shp2pgsql. In this setup you can 
easily join tables, create inherited tables if you are working with data like 
streets.shp for multiple countries so the parent table can be used to 
seamlessly display the multiple streets tables as a single layer in mapserver.

He may have to rethink his work flow a little because the tools are different, 
but this would be the case regardless if he is changing the software that he is 
using.

-Steve W

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org<mailto:mapserver-users@lists.osgeo.org>
http://lists.osgeo.org/mailman/listinfo/mapserver-users

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Re: Join from SHP file to PostgreSQL table

2010-11-29 Thread Flavio Carmo
Hi,

Sorry, but i cant upload the shapes to postgres. The shapefiles are modified
using arcview and the data in the postgres is modified using a custom
desktop software that my client uses for about 5 years. The software open
the shapefiles, then using a ODBC connection with postgres, make the join in
memory and shows the information for each geometry.

I cant undo this situation, so, my client propose to me to uses a opensource
solution to also make this join in a WMS service. He knows Geoserver and
Mapserver. Geoserver cant do this too, so i've hoped that mapserver could be
a solution.

Regards,

Flávio Carmo


On Mon, Nov 29, 2010 at 16:35, Stephen Woodbridge
wrote:

> On 11/29/2010 2:21 PM, flaviocarmo wrote:
>
>>
>> Hi,
>>
>> Thanks all for your responses. Im a novice in Mapserver so, after reading,
>> now i know that:
>>
>> - I cant use a JOIN to shown only geometrys with the CODE field stored on
>> Postgres (or another Database) because joins cannot modify the look of a
>> map;
>>
>> - I need to use a template always to show the queries results;
>>
>> - Case-sensitive fields can be a problem in a query with mapserver;
>>
>> - The "PG:" string for was my mistake. I missed in the mail, but was in my
>> MAP file. Sorry.
>>
>> Now what? There isnt a way to solve my issue? My client needs a opensource
>> solution to deliver his data. His current solution (ESRI ArcGIS Server) is
>> too expensive to buy another license, so he asked for a solution with the
>> same quality, but opensource.
>>
>> There is a way to workaround this?
>>
>
> Favlio,
>
> I would put all the data in a postgres/postgis database and display it from
> there. There is a simple shapefile loader:  shp2pgsql. In this setup you can
> easily join tables, create inherited tables if you are working with data
> like streets.shp for multiple countries so the parent table can be used to
> seamlessly display the multiple streets tables as a single layer in
> mapserver.
>
> He may have to rethink his work flow a little because the tools are
> different, but this would be the case regardless if he is changing the
> software that he is using.
>
> -Steve W
>
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Re: Join from SHP file to PostgreSQL table

2010-11-29 Thread Stephen Woodbridge

On 11/29/2010 2:21 PM, flaviocarmo wrote:


Hi,

Thanks all for your responses. Im a novice in Mapserver so, after reading,
now i know that:

- I cant use a JOIN to shown only geometrys with the CODE field stored on
Postgres (or another Database) because joins cannot modify the look of a
map;

- I need to use a template always to show the queries results;

- Case-sensitive fields can be a problem in a query with mapserver;

- The "PG:" string for was my mistake. I missed in the mail, but was in my
MAP file. Sorry.

Now what? There isnt a way to solve my issue? My client needs a opensource
solution to deliver his data. His current solution (ESRI ArcGIS Server) is
too expensive to buy another license, so he asked for a solution with the
same quality, but opensource.

There is a way to workaround this?


Favlio,

I would put all the data in a postgres/postgis database and display it 
from there. There is a simple shapefile loader:  shp2pgsql. In this 
setup you can easily join tables, create inherited tables if you are 
working with data like streets.shp for multiple countries so the parent 
table can be used to seamlessly display the multiple streets tables as a 
single layer in mapserver.


He may have to rethink his work flow a little because the tools are 
different, but this would be the case regardless if he is changing the 
software that he is using.


-Steve W
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users