News

  Analyzed 3 days ago based on code collected 3 days ago.
 
Posted 9 months ago by Project Collection Service Accounts
Upgrade: New Version of LabDefaultTemplate.xaml. To upgrade your build definitions, please visit the following link: http://go.microsoft.com/fwlink/?LinkId=254563
Posted 9 months ago by Project Collection Service Accounts
Checked in by server upgrade
Posted about 1 year ago by wangdun686
HI,Everyone:

     I want to do insection search on my shp. I used RelateQuery

“SELECT ST_t.* FROM [ST].[RelateQuery]('AnGeoPolygon', 'the_geom', [ST].[PointFromText]('Point(5 5)',4326), 'Intersects') AS ... [More] ST_q
INNER JOIN [dbo].[AnGeoPoint] AS ST_t ON ST_q.[oid] = ST_t.[oid]” 

    and ST.Intersects

“SELECT * FROM AnGeoPoint where ST.[Intersects](the_geom,ST.PointFromText('Point(5 5)',4326)) = 1”。

But only ST.Intersects returned two right items,the ST.RelateQuery reurned nothing.  Is there any errors in ST.RelateQuery in my SQL?

Thanks  [Less]
Posted about 1 year ago by wangdun686
Hi,EveryOne:

     I want to import my shp into another Pc in my LAN. Does it support now? if can,How? And I import my shp into SQLServer2005 installed in  my PC,I found the information of srid missing. But my shpfile has ... [More] spatialreference of WGS84. I used the cmd command

"

msscmd -server=LOCALHOST\SQLEXPRESS -db=mssql_database -table=mssql_table -import=shp -shp_filename="D:\shapefile.shp"

"thanks for any replys [Less]
Posted over 1 year ago by Sankoo
Hi!

Check your uploadad shape file format.

- Your geometry column is a geometry type column not a geography,

- all the records are valid geometry //UPDATE your_table_name SET geom = geom.MakeValid()

- do you have ... [More] boundary columns? e.g.: envelope_MinX... If yo do not, the sharpmap cannot render the layer

 

A had the same problem, and  I used the MsSql.cs CreateDatabase(string shapeFile) method to upload shapefiles to Sql Server and used MsSql class ro render vector layer instead of MsSqlSpatial. It solved the problem. But it makes an image type column from the geometry.

It will be good for sharpmap, but if you would like to make spatial query-s, you have to convert it to geometry type.

  [Less]
Posted almost 2 years ago by ahtsair
Hi, did you solve it ? Thanks a lot!
Posted almost 2 years ago by ahtsair
Hi, did you solve it ? Thanks a lot!
Posted about 2 years ago by zouyu01
C:\Program Files\Microsoft SQL Server\90\Tools\MsSqlSpatial>msscmd -server=esri-
client4 -db=db_gis -table=AgriculturalMineralsOperations -import=shp -shp="C:\HS
IP_GOLD2005\HSIP Gold ... [More] 2005\Data\Infrastructure\Mining\AgriculturalMineralsOperat
ions.shp"

should be

C:\Program Files\Microsoft SQL Server\90\Tools\MsSqlSpatial>msscmd -server=esri-
client4 -db=db_gis -table=AgriculturalMineralsOperations -import=shp --shp_filename="C:\HS
IP_GOLD2005\HSIP Gold 2005\Data\Infrastructure\Mining\AgriculturalMineralsOperat
ions.shp" [Less]
Posted over 2 years ago by skylokay
I'm using mssql 2008 and the sqlspatialtools to export my shapefiles into my database...
Posted over 2 years ago by skylokay
These are the codes I'm using...

 

namespace Sqlversion
{
    public partial class _Default : System.Web.UI.Page
    {
        protected void ... [More] Page_Load(object sender, EventArgs e)
        {
            SharpMap.Map myMap = new SharpMap.Map(new Size(400, 300));
            myMap.Size = new System.Drawing.Size(300, 200); //Set output size

            myMap.MinimumZoom = 100; //Minimum zoom allowed
            myMap.BackColor = Color.White; //Set background
            myMap.Center = new SharpMap.Geometries.Point(3100000, 1100000); //Set center of map

            string ConnStr = "Data Source=KWAME-PC;Initial Catalog=spatial; User ID=webapp;Password=webapp;";
            SharpMap.Layers.VectorLayer myLayer = new SharpMap.Layers.VectorLayer("GEOTABLE");
            myLayer.DataSource = new SharpMap.Data.Providers.MsSqlSpatial(ConnStr, "Premier_Towers_Area", "GEOCOLUMN", "oid");
            myLayer.MaxVisible = 40000;
            myMap.Layers.Add(myLayer);
            System.Drawing.Image imgMap = myMap.GetMap();

          
        }
    }
} [Less]
 

 
 

Creative Commons License Copyright © 2013 Black Duck Software, Inc. and its contributors, Some Rights Reserved. Unless otherwise marked, this work is licensed under a Creative Commons Attribution 3.0 Unported License . Ohloh ® and the Ohloh logo are trademarks of Black Duck Software, Inc. in the United States and/or other jurisdictions. All other trademarks are the property of their respective holders.