How to get latitude and longitude on input of address in geoserver

Shaik Mujahid Ali

I am new to geoserver, i am trying to get latitude and longitude on input of some address, but i am not successful . I have no idea how to do this. I have downloaded few shape files and able to load it into geoserver and load the map . Now i want to pass the address and get the lat long.
I have tried with following, please help:

package geoserver;

import it.geosolutions.geoserver.rest.GeoServerRESTPublisher; import it.geosolutions.geoserver.rest.GeoServerRESTReader;

import java.io.File;

public class GeoREST {

public static void main(String[] args) {

    String RESTURL = "http://localhost:8080/geoserver";
    String RESTUSER = "admin";
    String RESTPW = "geoserver";
    try {
         GeoServerRESTReader reader = new
         GeoServerRESTReader(RESTURL,RESTUSER, RESTPW);
        GeoServerRESTPublisher publisher = new GeoServerRESTPublisher(
                RESTURL, RESTUSER, RESTPW);

        boolean created = publisher.createWorkspace("myWorkspace");
        System.out.println(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>" + created);
        File zipFile = new File("D:/IDM-Marvin/Geoserver/nyc_roads.zip");
        boolean published = publisher.publishShp("myWorkspace", "myStore",
                "nyc_roads", zipFile, "EPSG:4326", "default_point");
        System.out.println(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>" + published);
        System.out.println("::::::::::::Done:::::::::::::::::::::::");


    } catch (Exception e) {
        e.printStackTrace();
    }
}

}

Ron Thompson

It will depend on what other tools you can use, it looks like. Based on this question it looks like you need to use WMS extension to get the lat-long. Hope that helps.

이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.

침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제

에서 수정
0

몇 마디 만하겠습니다

0리뷰
로그인참여 후 검토

관련 기사

분류에서Dev

How to get Longitude and Latitude of user? I also wanted to convert that in an address as precise as possible

분류에서Dev

What is the best way to get longitude and latitude for an address via Google in java

분류에서Dev

How to get Latitude and Longitude without using GPS?

분류에서Dev

How to group an array by latitude and longitude?

분류에서Dev

Get nearest Latitude and Longitude from array

분류에서Dev

How to get latitude and longitude of my current location in android ? (Not with GPS but with internet service)

분류에서Dev

Can't Get GPS Current Location's Latitude and Longitude Android

분류에서Dev

How to cluster Latitude and longitude data in python (or remove unwanted data)?

분류에서Dev

How to convert a vector (X,Y) position to a latitude/longitude coordinate? Javascript

분류에서Dev

How to move marker in googlemap while getting different latitude,longitude in android

분류에서Dev

insert latitude longitude in database

분류에서Dev

Getting 0.0 for longitude and latitude on tablet

분류에서Dev

Adding Latitude and Longitude to email Android

분류에서Dev

Passing latitude and longitude to another activity

분류에서Dev

using Gps Getting Latitude and Longitude

분류에서Dev

How to draw a line / link between two points on a D3 map based on latitude / longitude?

분류에서Dev

How to create a PostgreSQL index that includes Latitude/Longitude (using GIST), but also regular fields

분류에서Dev

Use id made from latitude and longitude

분류에서Dev

Rails and ActiveRecord - Nearest points by latitude and longitude

분류에서Dev

Create Google Map from location (No by Latitude/Longitude)

분류에서Dev

Arduino-GPS is not giving longitude and latitude values

분류에서Dev

Get gravity forms input value for address field

분류에서Dev

How to get the IP address [MYSQL]

분류에서Dev

How to set google maps to an address by user input

분류에서Dev

Clustering connected set of points (longitude,latitude) using R

분류에서Dev

Drawing polygons using latitude/longitude values in D3

분류에서Dev

Google Maps API for Latitude and Longitude (Bash) 구문 분석

분류에서Dev

How to get true address of a shortened URL in PHP?

분류에서Dev

How to get each IP address in subnet?

Related 관련 기사

  1. 1

    How to get Longitude and Latitude of user? I also wanted to convert that in an address as precise as possible

  2. 2

    What is the best way to get longitude and latitude for an address via Google in java

  3. 3

    How to get Latitude and Longitude without using GPS?

  4. 4

    How to group an array by latitude and longitude?

  5. 5

    Get nearest Latitude and Longitude from array

  6. 6

    How to get latitude and longitude of my current location in android ? (Not with GPS but with internet service)

  7. 7

    Can't Get GPS Current Location's Latitude and Longitude Android

  8. 8

    How to cluster Latitude and longitude data in python (or remove unwanted data)?

  9. 9

    How to convert a vector (X,Y) position to a latitude/longitude coordinate? Javascript

  10. 10

    How to move marker in googlemap while getting different latitude,longitude in android

  11. 11

    insert latitude longitude in database

  12. 12

    Getting 0.0 for longitude and latitude on tablet

  13. 13

    Adding Latitude and Longitude to email Android

  14. 14

    Passing latitude and longitude to another activity

  15. 15

    using Gps Getting Latitude and Longitude

  16. 16

    How to draw a line / link between two points on a D3 map based on latitude / longitude?

  17. 17

    How to create a PostgreSQL index that includes Latitude/Longitude (using GIST), but also regular fields

  18. 18

    Use id made from latitude and longitude

  19. 19

    Rails and ActiveRecord - Nearest points by latitude and longitude

  20. 20

    Create Google Map from location (No by Latitude/Longitude)

  21. 21

    Arduino-GPS is not giving longitude and latitude values

  22. 22

    Get gravity forms input value for address field

  23. 23

    How to get the IP address [MYSQL]

  24. 24

    How to set google maps to an address by user input

  25. 25

    Clustering connected set of points (longitude,latitude) using R

  26. 26

    Drawing polygons using latitude/longitude values in D3

  27. 27

    Google Maps API for Latitude and Longitude (Bash) 구문 분석

  28. 28

    How to get true address of a shortened URL in PHP?

  29. 29

    How to get each IP address in subnet?

뜨겁다태그

보관